Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通过使用
print_r($_POST);
我正在获取类似这样的数据
Array ( [selected_friends] => {"0":"699712136","1":"1622040878","2":"100002980112267"})
我如何将它用作数组并将其放入数组变量中
$a[0] = 699712136; $a[1] = 1622040878;
等等。
你可以做
$a = json_decode($_POST['selected_friends'], true);
它看起来像 JSON。试试 json_decode()