Json string to array problem string (186) & nbsp; {id: 2, num: 2, store: 9, name: taimington abrasion warning line (front, back), price: 88.00} string (96) & nbsp; {id: 2, num: 1, store: 9, name: taimington abrasion warning line (front, back), price json string to array conversion problem
String (186) "{" id ":" 2 "," num ": 2," store ":" 9 "," name ":" taimington abrasion warning line (front,) "," price ":" 88.00 "}"
String (96) "{" id ":" 2 "," num ": 1," store ":" 9 "," name ":" taimington abrasion warning line (front,) "," price ":" 88.00 "}"
The above two json strings look at the same length and print out a 186, 96, and 96 string, which can be converted into an array using json_decode, but not 186 ~~
------ Solution ----------------------
The last one is 96 characters long and is a normal json string, so it can be decoded.
The previous one is 186 characters long and obviously contains other content, so it cannot be decoded. You can observe the results of var_dump in text mode.