How does PHP remove quotation marks on both sides of the array and return the array

as shown in the figure, how to get to the quotation marks on both sides of the queue and return the data in array format

Mar.02,2021

if my eyes read it correctly, it should be a json string with extra spaces. According to my thinking, it should be like this.

// json_str
$str = '{"aa":"  [[123123,123123123],[123123123,123123],[123,123123]]"}';
// 
$arr = json_decode($str,true);
// 
$data = json_decode(trim($arr['aa']),true);
print_r($data);

trim ($str,'[]')


you may have to use regular processing, extract all the characters like [xxxx,yyyyy] through json_decode, and then push into a newly declared array.


are you missing a json_decode??


$str ='{"aa": "[[123123 str 123123123], [123123123 123123], [123123123]]}';
/ / first transfer yard farmhouse
$arr = json_decode ($str,true);

print_r (trim ($arr ['aa']));

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf01a4-31ce9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf01a4-31ce9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?