json_encode() 函数介绍
<?php $arr = array ( ‘Name‘=>‘希亚‘, ‘Age‘=>20 ); $jsonencode = json_encode($arr); echo $jsonencode; ?>
{"Name":null,"Age":20}
$php_json = json_decode($php_json);
时间: 2024-10-14 23:01:10
<?php $arr = array ( ‘Name‘=>‘希亚‘, ‘Age‘=>20 ); $jsonencode = json_encode($arr); echo $jsonencode; ?>
{"Name":null,"Age":20}
$php_json = json_decode($php_json);