using the below code for decoding json
$categories = json_decode($data); $categories = $categories->data;
where i get this
@Gordon seems correct - that looks like JSON. Assuming, though, that you're dealing with an "actual" PHP Object, then it will be iterable; simply run through it with a foreach and push each key/value pair into your destination array.
foreach