Is this json? I need to echo certain info out of this and having trouble doing it. I have tried json_decode, and it doesn't seem to work.
a:4:{s:5:"entry";a:1:{s:4:"type";s:10:"individual";}s:5:"group";a:1:{s:6:"family";a:0:{}}s:5:"image";a:3:{s:6:"linked";b:1;s:7:"display";b:1;s:4:"name";a:4:{s:9:"thumbnail";s:19:"jim12_thumbnail.jpg";s:5:"entry";s:15:"jim12_entry.jpg";s:7:"profile";s:17:"jim12_profile.jpg";s:8:"original";s:18:"jim12_original.jpg";}}s:4:"logo";a:3:{s:6:"linked";b:1;s:7:"display";b:1;s:4:"name";s:14:"jim12_logo.jpg";}}
use
$decode = unserialize('a:4:{s:5:"entry";a:1:{s:4:"type";s:10:"individual";}s:5:"group";a:1:{s:6:"family";a:0:{}}s:5:"image";a:3:{s:6:"linked";b:1;s:7:"display";b:1;s:4:"name";a:4:{s:9:"thumbnail";s:19:"jim12_thumbnail.jpg";s:5:"entry";s:15:"jim12_entry.jpg";s:7:"profile";s:17:"jim12_profile.jpg";s:8:"original";s:18:"jim12_original.jpg";}}s:4:"logo";a:3:{s:6:"linked";b:1;s:7:"display";b:1;s:4:"name";s:14:"jim12_logo.jpg";}}')
and then
print_r($decode);
to have informations about the object
EDIT:
it's just an array and you can access it's information this way:
$decode['image']['name']['thumbnail']
in this example, you'll get the thumbnail value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With