Forum Moderators: coopster

Message Too Old, No Replies

converting PHP array to JSON

is there a simple function to do it?

         

httpwebwitch

9:15 pm on Jan 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't have PHP 5.2 (yet) and to get another PEAR it's a 2-day process of contacting the host for IT support...

I just want to convert an Array into a JSON string

is there a basic function that will do it?

coopster

9:59 pm on Jan 10, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You mean you want to build a query string [php.net]? Requires PHP5.

httpwebwitch

1:30 am on Jan 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



nope... I want to build a JSON [ca3.php.net] string, but I don't have PHP5.2.0

I found what I needed here [pear.php.net]