mca*_*edo 1 php
我有一个这样的字符串:["8","14","22"]我怎么能把它变成一个数组?
Wes*_*rch 9
这恰好是JSON格式,因此使用json_decode():
json_decode()
$str = '["8","14","22"]'; $arr = json_decode($str); print_r($arr); // Output: // Array // ( // [0] => 8 // [1] => 14 // [2] => 22 // )
归档时间:
13 年,8 月 前
查看次数:
74 次
最近记录:
13 年,4 月 前