note 77890 added to function.list
| From: | tenz699 at hotmail dot com | Date: | Tue, 18 Sep 2007 17:50:54 +0000 |
| Subject: | note 77890 added to function.list | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130571@lists.php.net to get a copy of this message | ||
PhP manual's NOTE says: list() only works on numerical arrays and assumes the numerical indices
start at 0.
I'm finding it do works for associative arrays too,as below:
<?
$tenzin = array ("1" => "one", "2" =>
"two","3"=>"three");
while(list($keys,$values) = each($tenzin))
echo($keys." ".$values."<br>");
?>
gives O/P
1 one
2 two
3 three
tsarma
----
Server IP: 194.153.94.10
Probable Submitter: 84.72.101.99
----
Manual Page -- http://www.php.net/manual/en/function.list.php
Edit -- https://master.php.net/note/edit/77890
Del: integrated -- https://master.php.net/note/delete/77890/integrated
Del: useless -- https://master.php.net/note/delete/77890/useless
Del: bad code -- https://master.php.net/note/delete/77890/bad+code
Del: spam -- https://master.php.net/note/delete/77890/spam
Del: non-english -- https://master.php.net/note/delete/77890/non-english
Del: in docs -- https://master.php.net/note/delete/77890/in+docs
Del: other reasons-- https://master.php.net/note/delete/77890
Reject -- https://master.php.net/note/reject/77890
Search -- https://master.php.net/manage/user-notes.php