RE: [PHP] the numeric key of an array???
| From: | John W. Holmes | Date: | Sat, 21 Dec 2002 02:12:35 +0000 |
| Subject: | RE: [PHP] the numeric key of an array??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129045@lists.php.net to get a copy of this message | ||
> > If you're looking to loop through your array, there are other
methods.
> Well which kind of methods are you talking about?? could you tell me
some
> for do it??
foreach($array as $key=>$value)
www.php.net/foreach
while(list($key,$value) = each($array)
www.php.net/each
www.php.net/list
$cnt = count($array);
for($x=0;$x<$cnt;$x++)
www.php.net/count
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/