CodeIgniter Forums
json_encode and decode help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: json_encode and decode help (/showthread.php?tid=30724)



json_encode and decode help - El Forum - 05-24-2010

[eluser]NachoF[/eluser]
I have been building my app and it uses json_encode to provide ajax data and many places.
Now I learned that the server will be php 5.1.6 which doesnt suppor these methods... what can I do!?


json_encode and decode help - El Forum - 05-25-2010

[eluser]LuckyFella73[/eluser]
Hi NachoF,

in case your data is not too complex you can manually
build your json data and return it via echo. I even read
that there is a library out there which can do that for
you. For flat results it's pretty easy to do it yourself.


json_encode and decode help - El Forum - 05-25-2010

[eluser]Clooner[/eluser]
Or switch to using serialize and unserialize instead of json_encode / decode...