Jump to content

JSon


cgishack

Recommended Posts

I can send a Json string from php and get Javascript to convert it to a Java Script Object .

But How can I go the other way....

 

If i am sending the following string to php using POST, how can i get use this in PHP ?


{"minx":-101.341258,"maxx":-68.1977363,"miny":39.9732256,"maxy":64.830867}

 

I tried


$json = json_encode($_POST['json']);
echo $json->maxx;

and


$json = json_decode($_POST['json']);
echo $json->maxx;

 

But I get nothing .

 

Drew

 

 

Link to comment
https://forums.phpfreaks.com/topic/52177-json/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.