[ create a new paste ] login | about

Link: http://codepad.org/s4w6DSh9    [ raw code | output | fork ]

PHP, pasted on Jun 22:
1
2
3
4
5
6
7
8
9
<?php

$array = array( "test" => '"', "hi\\" => "b'\"y:/?e" );


var_dump( $array );
parse_str( http_build_query( $array, '', '&' ), $output);

var_dump( $output );


Output:
1
2
3
4
5
6
7
8
9
10
11
12
array(2) {
  ["test"]=>
  string(1) """
  ["hi\"]=>
  string(8) "b'"y:/?e"
}
array(2) {
  ["test"]=>
  string(2) "\""
  ["hi\\"]=>
  string(10) "b\'\"y:/?e"
}


Create a new paste based on this one


Comments: