[ create a new paste ] login | about

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

martin@mustbebuilt.co.uk - PHP, pasted on Dec 5:
1
2
3
4
5
6
<?php
$myarray = array('Guitar' => 'Johnny', 'Vocals'=> 'Stephen',
'Bass' => 'Andy', 'Drums' => 'Mike');
$myJson = json_encode($myarray);
echo $myJson;
?>


Output:
1
{"Guitar":"Johnny","Vocals":"Stephen","Bass":"Andy","Drums":"Mike"}


Create a new paste based on this one


Comments: