RE: [PHP] HELP URGENT VARS !!!

From: Date: Fri, 30 Nov 2001 13:01:31 +0000
Subject: RE: [PHP] HELP URGENT VARS !!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76191@lists.php.net to get a copy of this message
You can also use this syntax : $var1="variable 1"; $var2="variable 2"; for ($i= 1; $i < 3; $i++) { echo ${"var$i"}; } -----Message d'origine----- De : Olivier Masudi [mailto:olivier@clickway.be] Envoyé : vendredi 30 novembre 2001 12:02 À : php-general@lists.php.net Objet : [PHP] HELP URGENT VARS !!! $name1=a; $name2=b;.... I want to do this for($i=0;$i<$nbname;$i++) echo "\$name$i"; output : a b .... where "\$name$i" = $name1 , $name2 , $name3 ...... I try to print tha value of the vars $name1,..... not the string $name1,.... Is it possible ???? REM : The vars $name1,.... com from a form where the number of name input are variable. Thank you -- 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 (#76191) next »