I’m pulling JSON from Instagram:
$instagrams = json_decode($response)->data;
Then parsing variables into a PHP array to restructure the data, then re-encoding and caching the file:
file_put_contents($cache,json_encode($results));
When I open the cache file all my forward slashes “https://stackoverflow.com/” are being escaped:
http:\/\/distilleryimage4.instagram.com\/410e7...
I gather from my searches that json_encode()
automatically does this…is there a way to disable it?