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:[EMAIL PROTECTED]]
Envoyé : vendredi 30 novembre 2001 12:02
À : [EMAIL PRO
';
}
?>
Zliy Pes, http://www.zliypes.com.ua
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
$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 fr
3 matches
Mail list logo