php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #1591 bigmanual.html -- rsort example
Submitted: 1999-06-23 17:36 UTC Modified: 1999-06-23 17:39 UTC
From: joel at mobila dot cx Assigned:
Status: Closed Package: Documentation problem
PHP Version: 3.0.9 OS: Linux 2.2.9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joel at mobila dot cx
New email:
PHP Version: OS:

 

 [1999-06-23 17:36 UTC] joel at mobila dot cx
This is the example code for rsort:
    $fruits = array("lemon","orange","banana","apple");
    rsort($fruits);
    for(reset($fruits); ($key,$value) = each($fruits); ) {
        echo "fruits[$key] = ".$value."\n";
    }

When I tried this I got the following error:
Parse error: parse error in /home/www/htdocs/test.php3 on line 6

Sorry. But I have no idea what causes this problem. I began learning PHP3 today... =) (...and I'm allready reporting bugs :)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-23 17:39 UTC] andrey at cvs dot php dot net
You need to have:
list($key, $value)

instead of

($key, $value)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 26 16:01:30 2024 UTC