Using a variable in a variable or as the second part of an array?

From: Date: Sat, 20 Jan 2001 00:41:52 +0000
Subject: Using a variable in a variable or as the second part of an array?
Groups: php.general 
Request: Send a blank email to php-general+get-35766@lists.php.net to get a copy of this message
I need to simulate this effect: $array[$i] or \$something . $i, and have it return $checkbox1 $checkbox2 etc. on up in a while loop. Just doing it doesn't seem to work, but does anyone know of any work arounds? Or just the keyword I should be looking for to search the manual? I have a form being generated from a database. For every entry in the database, there'll be a checkbox in the form. Basically, I need a way of accessing the values of that checkbox (any or all of the checkboxes can be checked, too). The names of the checkbox would increment up like checkbox1 checkbox2 etc. Since I have no clue how many people are in the database, that increment needs to be some sort of variable, so I can read the value from that checkbox (whether or not it's checked) when the form is submitted. Did that make any sense? Sorry I was so vague.

« previous php.general (#35766) next »