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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 + 29 = ?
Subscribe to this entry?

 
 [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

Pull Requests

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: Sat Sep 28 23:01:27 2024 UTC