problem with parse_str

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



version: 4.3.2

the example from:
http://de2.php.net/manual/en/function.parse-str.php

$str = "first=value&arr[]=foo+bar&arr[]=baz";
parse_str($str);
echo $first;  // value
echo $arr[0]; // foo bar
echo $arr[1]; // baz

parse_str($str, $output);
echo $output['first'];  // value
echo $output['arr'][0]; // foo bar
echo $output['arr'][1]; // baz


produces:
value&arr[]=foo bar&arr[]=bazvalue&arr[]=foo bar&arr[]=baz

or slightly modified:
for first: value&arr[]=foo bar&arr[]=baz
for arr[0]:
for arr[1]:


which isn't the intended behavior :/
any ideas?

greetings
dalini

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux