note 16196 deleted from ref.array by jimw
| From: | jimw@php.net | Date: | Fri, 19 Oct 2001 18:10:41 +0000 |
| Subject: | note 16196 deleted from ref.array by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19176@lists.php.net to get a copy of this message | ||
If you're using the form --> array trick, (<INPUT NAME='MyForm[MyVar]'>),
make sure you do not put quotes around the variable name inside the brackets:
Incorrect:
<INPUT NAME='MyForm["MyVar"]'>
Correct:
<INPUT NAME='MyForm[MyVar]'>
The quotes will cause the actual index of the array to contain quotes and you have to take them out
before being able to access the array item. i.e. :
After using the incorrect method:
$MyForm["MyVar"] will not work because PHP is thinking that the quotes are special
characters, not part of the index's name.
Using the correct method will result in the existence of $MyForm["MyVar"]
-- Jonathan