note 18106 added to function.next
| From: | frixuelin at hotmail dot com | Date: | Thu, 10 Jan 2002 17:58:12 +0000 |
| Subject: | note 18106 added to function.next | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24631@lists.php.net to get a copy of this message | ||
I think that the best way is using foreach().
foreach($array as $val)
{
function($val);
}
In some cases, you can use key() and array_keys() for getting the wanted result:
global $HTTP_SESSION_VARS;
echo "My session variables are:\n";
foreach(array_keys($HTTP_SESSION_VARS) as $key)
{
"Name: $key, value: ".$HTTP_SESSION_VARS[$key];
}
Hope it helps.
--
http://www.php.net/manual/en/function.next.php
http://master.php.net/manage/user-notes.php?action=edit+18106
http://master.php.net/manage/user-notes.php?action=delete+18106
http://master.php.net/manage/user-notes.php?action=reject+18106