Im outputting some data as JSON and Im trying to replace the brackets '[' in the output with HTML tags:
$qq = json_decode($html, true);
$qq2 = str_replace("[","<span>",$qq);
print_r($qq2);
It doesn't work, meaning the brackets show up anyway and are not getting replaced. Example output:
[2] => Array
(
[image] => http://rack.0.mshcdn.com/james-clapper.jpg
[query] => (max-width: 480px)
[size] => 80x80#
)
I would like to replace the brackets as html tags so the output will be:
[2] => Array
(
<span> image </span> => http://rack.0.mshcdn.com/james-clapper.jpg
<span> query </span> => (max-width: 480px)
<span> size </span> => 80x80#
)