GLOBALS question

From: Date: Wed, 24 May 2000 00:58:13 +0000
Subject: GLOBALS question
Groups: php.general 
Request: Send a blank email to php-general+get-401@lists.php.net to get a copy of this message
why does the first example work but the next one just gives me the propper count, not the actual variable values. example 1: <? $a1 = array(1, 2, 3, 4, "testing", 5); print "a1:\n"; for($i=0,$n=count($a1); $i<$n; $i++) { print " $i: $a1[$i]\n"; } ?> example 2: <? print "globals:\n"; for($i=0,$n=count($GLOBALS); $i<$n; $i++) { print " $i: "; print $GLOBALS[$i]; print "\n"; } ?> cheers, Angus.

« previous php.general (#401) next »