Mega Code Archive
Pass an array as the second parameter to parse_str( ), and it will put the variables into there
$array = array( );
if (isset($array['foo'])) {
print "Foo is {$array['foo']}
";
} else {
print "Foo is unset
";
}
parse_str("foo=bar&bar=baz", $array);
if (isset($array['foo'])) {
print "Foo is {$array['foo']}
";
} else {
print "Foo is unset
";
}
?>