Re: problem with foreach
| From: | Philip Thompson | Date: | Mon, 22 Oct 2007 19:12:33 +0000 |
| Subject: | Re: problem with foreach | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263516@lists.php.net to get a copy of this message | ||
On 10/22/07, Adam Williams <awilliam@mdah.state.ms.us> wrote:
>
> I have an html page with checkboxes:
>
> <form action=mailform2.php method=POST>
> <input type=checkbox name=option[] value="Modern Mississippi">Modern
> Mississippi<br>
Change to: <input type="checkbox" name="option[]" value="..."
/>...<br/>
Someone mentioned this earlier, but I thought I'd reiterate. I'm not sure
how the browser will deal with *arrays* that aren't quoted. It's very good
practice to explicitly tell what is what - don't let the browser interpret
as it wants to. (Side note: the / at the ends are for XHTML - they're
optional if only using HTML.)
~Philip