Hi Folks:
I was going to propose something similar. Allow me to tweak:
>
> *
> *
>
>
>
> on you script page
># $mand = array("foo", "bar");
$mand = array('foo', 'bar');
> # $cnt = count($mand);
> # for ($i = 0; $i < $cnt; $i++)
> # if (!in_array($mand[$i], $my_array))
>
On Wed, 12 Jun 2002, Tom Ray wrote:
> I have an array question. I want to use a dynamic array but I don't know
> how to do this. What I want to do is this, I want to write a form script
> that takes the elements of the form and submits them in the array then I
> want to do a loop and check to s
If you want to use an array for you form, then here's one method
on you form page
*
*
...
on you script page
\n";
?>
I haven't tested it though. Maybe you could use array_diff() ???
-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 12:48 PM
To
> -Original Message-
> From: RealGM [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 3:38 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Dynamic Arrays?
>
>
> Hi,
>
> I have a bit of a dilemma.
>
> I have a number of array attributes, eg. $arrayname["var1"],
> $arrayname["var2
My first idea is something like this:
$counter=1
while ($counter <= some maximum number){
$arrayvalue="var".$counter
write $arrayname[$arrayvalue] to database
$counter++;
}
That should get the job done.
One other idea (depending on if you are just storing data or if you need to
manipulate i
5 matches
Mail list logo