You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
World Wide Web Server edited this page Jul 4, 2012
·
13 revisions
The JSON helper is a simple interface to the Pear Services_JSON class created by Michal Migurski, Matt Knapp, and Brett Stimmerman.
Only two functions exist, json_encode and json_decode. Both functions take one parameter, the data to be encoded/decoded.
Once data is encoded, it is decoded in Javascript as so (brackets should be parentheses):
[code]
//PHP
$data['encoded_data'] = json_encode($my_data);
$this->load->view('my_view', $data);