array way....

From: Date: Sun, 25 Aug 2002 16:21:19 +0000
Subject: array way....
Groups: php.windows 
Request: Send a blank email to php-windows+get-15496@lists.php.net to get a copy of this message
Can you helpme with that? I have some variables with names like: $myvar1, $myvar2, $myvar3... and so on... and I want to put them in an array. Ofcourse I need a Loop because I don't know the number of the variables. It will probably be like that: $myarray= range(1,NumberOfVars); $i=1 while ($ i <= NumberOfvars) { $myarray[$i]= $myvar.$i; # <----here is the problem right? } To be honest, the $myvar1... variables come with "post" method from a form and because I don't know how to send the directly as arrays I need this. So if someone knows how to send them directly from the form as arrays (if possible) it would be great thanks for advance, just started with php, crizz :D

« previous php.windows (#15496) next »