RE: [PHP] Anyone Up?

From: Date: Fri, 01 Feb 2002 07:29:36 +0000
Subject: RE: [PHP] Anyone Up?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-83071@lists.php.net to get a copy of this message
eval() is your solution. for ($i = 1; $i <= $NMax; $i++) { $variable = "\$Check$i"; eval("\$string = \"$variable\";"); echo $string."<br>"; } Niklas -----Original Message----- From: jtjohnston [mailto:taylorjo@collegesherbrooke.qc.ca] Sent: 1. helmikuuta 2002 9:16 To: php-general@lists.php.net Subject: [PHP] Anyone Up? Anyone Awake? Up? I'm using 12 checkboxes <INPUT TYPE="checkbox" NAME="Check1" VALUE="Your Name"> dynamically generated by mysql. Each has an id as primary index so I do this: <INPUT TYPE=\"checkbox\" NAME=\"Check".$mydata->id."\" VALUE=\"".$mydata->yourname."\"> When I submit, I want to echo to see if anyone clicked on them. But I can't get my variable right to find $check1 through $check12. How do I express in a for loop. $Check.$i does not work of course! for ($i = 1; $i <= $NMax; $i++) { echo $Check.$i"<br>"; } :) Help -- 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 (#83071) next »