Reputation: 63
I want to convert a string like this code below to array, How can I do this plz?
$icon = '{``font``:``feather``,``icon``:``feather-facebook``}';
Is there any way by using json_decode or something like this?
Thanks.
Upvotes: 1
Views: 27
Reputation: 1877
$icon = '{"font":"feather","icon":"feather-facebook"}';
$array = json_decode($icon);
var_dump($array);
Upvotes: 1