note 3617 deleted from array by ronabop

From: Date: Sat, 12 Aug 2000 21:31:59 +0000
Subject: note 3617 deleted from array by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1571@lists.php.net to get a copy of this message
Dear bigdan, in your routine is a small mistake ... while you print out the content of your array the 2nd part would'nt print out at all, because you provide a wrong name in the each funktion. you wrote : /* Now print out the contents of the array. */ while ( list($username, $subarray) = each($users) ) { echo "Username: $username: "; echo "<ul>"; // Following line is wrong in the each($array) .... // while ( list($key, $val) = each($array) ) { // correct it must be like this ... while ( list($key, $val) = each($subarray) ) { echo "<li>$key : $valn"; } so far Joerg ...

« previous php.notes (#1571) next »