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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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..




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux