array
0 =>
object(stdClass)[284]
public 'option_id' => string '243' (length=3)
public 'option_name' => string 'upme_profile_fields' (length=19)
public 'option_value' => string 'a:17:{i:50;a:7:{s:8:"position";s:2:"50";s:4:"type";s:9:"separator";s:4:"meta";s:22:"profile_info_separator";s:4:"name";s:12:"Profile Info";s:7:"private";i:0;s:7:"deleted";i:0;s:17:"show_to_user_role";i:0;}i:60;a:14:{s:8:"position";s:2:"60";s:4:"icon";s:6:"camera";s:5:"field";s:10:"fileupload";s:4:"type";s:8:"usermeta";s:4:"meta";s:8:"user_pic";s:4:"name";s:15:"Profile Picture";s:8:"can_hide";i:0;s:8:"can_edit";i:1;s:7:"private";i:0;s:6:"social";i:0;s:7:"deleted";i:0;s:17:"show_to_user_role";i:0;s:17:"edit_b'... (length=5301)
public 'autoload' => string 'yes' (length=3)
我如何获得字段' option_value'从上面的输出。
答案 0 :(得分:1)
我不知道你的变量名是什么,但你可以这样做:
$option_value = $array[0]->option_value;
由于它是一个对象,使用->
(箭头操作符),并指向所需的属性。