In my wp_options table, there is a field called profile_fields, that field is having the values like as given below
a:18:{
i:1;a:8:{
s:4:"type";s:8:"usermeta";s:4:"icon";s:8:"calendar";s:8:"position";s:1:"9";s:5:"field";s:6:"select";s:4:"name";s:15:"Graduation Year";s:4:"meta";s:15:"graduation_year";s:11:"meta_custom";s:0:"";s:6:"social";s:1:"0";s:8:"can_edit";s:1:"1";s:10:"allow_html";s:1:"0";s:8:"can_hide";s:1:"0";s:7:"private";s:1:"0";s:8:"required";s:1:"1";s:17:"show_to_user_role";s:1:"0";s:17:"edit_by_user_role";s:1:"0";
s:16:"show_in_register";
s:1:"1";
s:9:"help_text";
s:0:"";
s:7:"choices";
s:22:"1991
1992
1993
1994";
}
}
what I've to do for getting the s22 the field.(1991,1992,1993,1994). I have tried to dump the values using var_dump(), but it only shows some other fields.
anyone please help me.
UPDATED
I've took option value from the database like this
$a = get_option( 'upme_profile_fields' );
print_r($a);
now it prints like
there it not shows the above given contents(
a:18:{
i:1;a:8:{
s:4:"type";s:8:"......
)
Try this :-
$a = get_option( 'profile_fields' );
print_r($a);
// find the value you want to un-serialize, then, put as below
$arr = $a["YOUR VALUE KEY"];
$profile_arr = unserialize($arr);
print_r($profile_arr);