fork(2) download
  1. <?php
  2.  
  3. # parsez un Query String
  4. $str = "first=value&arr[]=foo+bar&arr[]=baz";
  5. parse_str($str);
  6. echo $first, "\n"; // value
  7. echo $arr[0], "\n"; // foo bar
  8. echo $arr[1], "\n"; // baz
  9.  
  10. print "\n";
  11. parse_str($str, $output);
  12. echo $output['first'], "\n"; // value
  13. echo $output['arr'][0], "\n"; // foo bar
  14. echo $output['arr'][1], "\n"; // baz
  15.  
  16. ?>
  17.  
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
value
foo bar
baz

value
foo bar
baz