[ create a new paste ] login | about

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

PHP, pasted on Jan 21:
1
2
3
4
5
6
7
8
<?php

$string='{"name": "John Doe", "Class": 45}'; // <-- if you can make it as valid json, you can use this method. 
$json=json_decode($string);

echo $json->name."\n";
echo $json->Class;
?>


Output:
1
2
John Doe
45


Create a new paste based on this one


Comments: