Re: -----json and php----help

From: Date: Tue, 11 May 2010 09:02:41 +0000
Subject: Re: -----json and php----help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-305074@lists.php.net to get a copy of this message
shahrzad khorrami wrote:
hi dears, I have a json file. I want to access some fileds of this json file only and can add some fields to it also... I couldn't find any thing in www, json api ! is there any function to get specific data from json file or add function that can add something in somewhere in this json file or create new json file from this file with my format?
$json = // get your json and pop it in this var $data = json_decode( $json ); // work on data as php arrays/objects etc $json = json_encode( $data ); // save the json back to a file or output or..

« previous php.general (#305074) next »