note 18106 deleted from function.next by aidan

From: Date: Sat, 18 Sep 2004 04:32:22 +0000
Subject: note 18106 deleted from function.next by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76913@lists.php.net to get a copy of this message
Note Submitter: frixuelin at hotmail dot com ---- 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.

« previous php.notes (#76913) next »