note 50143 deleted from control-structures.foreach by felipe
| From: | felipe@php.net | Date: | Sun, 09 Dec 2007 16:05:42 +0000 |
| Subject: | note 50143 deleted from control-structures.foreach by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133048@lists.php.net to get a copy of this message | ||
Note Submitter: xardas@spymac com
----
Quote:
-------------------------
It makes sense, since you cannot call only keys from an array with foreach().
-------------------------
Why not?
<?php
foreach(array_keys($array) as $string)
{
print 'array key is '.$string;
}
?>