note 13902 added to function.parse-str.php

From: Date: Mon, 09 Jul 2001 17:15:23 +0000
Subject: note 13902 added to function.parse-str.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15125@lists.php.net to get a copy of this message
It seems to be a mistake with the function parse_str() applyed to $QUERY_STRING. URL: http://mycomputer/myscript?delete=10&delete=12 HTML CODE: <Input type="checkbox" name=delete[] value=10> <Input type="checkbox" name=delete[] value=12> And (not the winner is :-) ) parse_str($QUERY_STRING) returns in the environment an array $delete with a size of 4 (instead of 2) !! Some programmer forget to divide a result by 2, or there is something I forget ? (TEST : $i=0; while (isset($delete)) { print "$delete[$i]\n"; $i++ } ... I obtain 4 writings with this test (i wanted not use the sizeof function for my test)). Regards http://www.php.net/manual/fr/function.parse-str.php

« previous php.notes (#15125) next »