note 10508 rejected and deleted from Array Functions by zak
| From: | zak@php.net | Date: | Wed, 17 Jan 2001 14:38:54 +0000 |
| Subject: | note 10508 rejected and deleted from Array Functions by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9880@lists.php.net to get a copy of this message | ||
Be careful if you want to submit a variable as an associative array.
If for some reason you use indexes that begin with a number - for instance some dynamically display
ID number :
<input type="textfield" name="vars[8eccbad8e776e]">
It seems to be a rare case but I needed to code that stuff.
The bug here comes from the fact the browser "urlencodes" the name of the field.
The array is actually transmitted but you can't use the "each()" function on It.
However I can swear you the array is not empty and - that's worse - the correct data is stored
at the correct index (is knew It making 'echo $vars["8ecc..."]').
The less boring solution I found is to put an "_" before any index.
Then you will surely find a way to remove it - using "preg_replace" for instance.