parse_str() - problem with semicolon
Posted: Mon Feb 08, 2010 7:33 am
Hi,
I have a strange problem with function parse_str(). It works fine everywhere, except one server (PHP 5.2.6).
Code example:
Normal/Expected output of this script is:
Array
(
[values] => 3;5;2
[x] => 43
)
but on this one specific server the output is:
Array
(
[values] => 3
[5] =>
[2] =>
[x] => 43
)
Do you have any idea what is wrong?
I have a strange problem with function parse_str(). It works fine everywhere, except one server (PHP 5.2.6).
Code example:
Code: Select all
$str = 'values=3;5;2&x=43';
parse_str($str, $x);
echo '<pre>'; print_r($x); echo '</pre>';
Array
(
[values] => 3;5;2
[x] => 43
)
but on this one specific server the output is:
Array
(
[values] => 3
[5] =>
[2] =>
[x] => 43
)
Do you have any idea what is wrong?