gt;
To: "1LT John W. Holmes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Brad Harriger"
<[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 7:39 PM
Subject: Re: [PHP] HTML Checkboxes and PHP variables
>
> I've been wrestling with the same issue.
I've been wrestling with the same issue. I had some code loop through and
create an arbitrary number of checkbox inputs with the name 'foo[]'
I then attempted to access the array using:
foreach ($foo as $bar)
{
echo $bar;
}
but I got error messages telling me that $foo is not an array
If you name the form elements as arrays, then yeah, they are pretty much the
same.
One
Two
Three
When submitted, $foo will be an array containing the values that were
checked. If a box was not checked, it won't have any value in the array.
i.e. If you check One and Three, then you'll have a $fo
3 matches
Mail list logo