RE: [PHP] GLOBALS...

From: Date: Wed, 01 Nov 2000 07:28:14 +0000
Subject: RE: [PHP] GLOBALS...
Groups: php.general 
Request: Send a blank email to php-general+get-23111@lists.php.net to get a copy of this message
You can do this: ${"stn$i"} and it will work in a loop as well. Globals, well I am not sure .. but I think the same should work here too: $GLOBALS["test$i"] so your loop while(true) { if(!${"stn$i"}) Break; # .... other staff .... } will perfectly work Cheers! ( rabotaesh po utram ? ) Maxim Maletsky -----Original Message----- From: Vladimir Novakovic [mailto:vnovakov@ai.sanu.ac.yu] Sent: Wednesday, November 01, 2000 3:53 PM To: php-general@lists.php.net Subject: [PHP] GLOBALS... I need to have several globals from $GLOBALS[test0] until $GLOBALS[test10], but under regular while/endwhile loops, will anyone help me and send some example? How to do that with regular variables too? For example I need to have varibale from $stn0 until $stn10. Is it possible to use something like: $stn$i What do I need - example: $num=10 $i=0; while($i < $num): $GLOBALS[phone0...10] = $stn0...10; $i = $i + 1; endwhile; thanks in advance, Vladimir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#23111) next »