📜  PHP代码示例中的数组到字符串转换

📅  最后修改于: 2022-03-11 14:54:53.458000             🧑  作者: Mango

代码示例6
$person = [
    'name' => 'Jon',
    'age' => 26,
    'status' => null,
    'friends' => ['Matt', 'Kaci', 'Jess']
];

echo json_encode($person);
// {"name":"Jon","age":26,"status":null,"friends":["Matt","Kaci","Jess"]}