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";}}
答案 0 :(得分:3)
使用
$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";}}')
然后
print_r($decode);
获取有关对象的信息
修改强>
它只是一个数组,您可以通过这种方式访问它的信息:
$decode['image']['name']['thumbnail']
在此示例中,您将获得缩略图值