note 26470 modified in function.array by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 13:56:57 +0000 |
| Subject: | note 26470 modified in function.array by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79747@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.
<?php
$ary = array("1"=>'One','Two',"3"=>'Three');
$a = '0'; $b = count($ary);
while ($a <= $b) {
$pr = $ary[$a];
print "$pr<br>";
$a++;
}
?>
--was--
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://php.net/manual/en/function.array.php