note 26470 added to function.array
| From: | MadLogic at Paradise dot net dot nz | Date: | Thu, 31 Oct 2002 20:39:25 +0000 |
| Subject: | note 26470 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38840@lists.php.net to get a copy of this message | ||
Heres a simple yet intelligent way of setting an array, grabbing the values from the array using a
loop.
$ary = array("1"=>'One','Two',"3"=>'Three');
$a = '0'; $b = count($ary);
while ($a <= $b) {
$pr = $ary[$a];
print "$pr<br>";
$a++;
}
--
http://www.php.net/manual/en/function.array.php
http://master.php.net/manage/user-notes.php?action=edit+26470
http://master.php.net/manage/user-notes.php?action=delete+26470
http://master.php.net/manage/user-notes.php?action=reject+26470