note 34717 deleted from reserved.variables by didou

From: Date: Tue, 05 Aug 2003 07:53:31 +0000
Subject: note 34717 deleted from reserved.variables by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53388@lists.php.net to get a copy of this message
Note Submitter: sheri_ellis@yahoo.com ---- Global arrays retrieved from $_POST have their names changed by the system so that the first letter is capitalized. It doesn't matter whether the array was in all caps or all lowercase. In my case, I was trying to set an array to select multiple: if ($page==1) { //displaying the form to grab user input global $family echo "<form action=search.php?page=2 method=POST>"; Family: <select name="Family[]" size=2 multiple> <option value=1>Hatfields</option> <option value=2>McCoys</option> ...} if ($page==2) { //parsing the user input while(list($k,$v)=each($family)) { //wouldn't work echo "$k => $v,\n"; } I had to refer to the array as $Family. Knowing this would've saved me hours!! I'm a relative newbie to PHP, so maybe it's a no-brainer for you gurus, but.... WAAAAH!!! :) Ok, turning rant off. Thanks for listening!

« previous php.notes (#53388) next »