ID:               16369
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: win2000 adv server
 PHP Version:      4.0.6
 New Comment:

That's on purpose since a . is not a legal character in a variable
name.


Previous Comments:
------------------------------------------------------------------------

[2002-03-31 21:27:24] [EMAIL PROTECTED]

When returning the results of parse_str() to an array,
the key will be renamed if it contains a period.

$str = "first=value&second[]=this+works&per.iod[]=another";
parse_str($str, $newArray);

echo $newArray;
/* prints "Array" */

echo $newArray['second']['0'];
/* prints "this works" */

echo $newArray['per.iod']['0'];
/* "Undefined index: per.iod " */

/* however...*/
echo $newArray['per_iod']['0']; /* prints "another" */

/* notice the array key has been renamed from per.iod to per_iod */

Glen

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16369&edit=1

Reply via email to