php实现JSON编码和解码
发表于:2024-03-02 20:32:25浏览:74次
JSON编码和解码:
<?php
$data = array("name" => "John", "age" => 30);
$jsonData = json_encode($data);
echo $jsonData . "<br>";
$decodedData = json_decode($jsonData, true);
echo $decodedData['name'];
?>
栏目分类全部>