i stored an array like {"10":"10","14":"14","16":"16","25":"25"}
this as string in data base, right now i tried to get only number from the above string. I tried with explode and str_replace but i can't get the data, can you please help me.
-
10 10 14 14....or 10 14 16 25?suibber– suibber2016-01-28 09:30:48 +00:00Commented Jan 28, 2016 at 9:30
Add a comment
|
1 Answer
This is a JSON object you have to decode it with json_decode and take its values with array_values:
$values = array_values(json_decode($string, true));