|  | Posted by usenet on 12/06/05 02:52 
On Mon, 05 Dec 2005 01:21:14 GMT, ljb <ljb220@mindspring.com.nospam> wrote:
 >usenet@isotopeREEMOOVEmedia.com wrote:
 >> PHP 4.2.2
 >> Apache 2.0.40
 >>
 >> My script receives values for several values :
 >> _POST["c1"] = "a"
 >> _POST["c2"] = "b"
 >> _POST["c3"] = "c"
 >> _POST["c4"] = "d"
 >>
 >> The number of vars posted changes however, so I need to access the $_POST
 >> variables using a loop.  I figured I could accomplish using one of these
 >> assignments, but apparently I'm wrong :
 >>
 >> $i = 1;
 >> $h = 7;  // this varies, based on a database record
 >>
 >> while ($i <= $h) {
 >> 	$c{$i} = $_POST['$c{$i}'];
 >...
 >
 >I think you want: $_POST["c$i"]
 
 Exactly !  Thanks so much, ljb.  I wasn't seeing the forest for the trees.
 [Back to original message] |