php - get options value from wp_options table -
in wp_options table, there field called profile_fields, field having values 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 getting s22 field.(1991,1992,1993,1994). have tried dump values using var_dump(), shows other fields.
anyone please help me.
updated
i've took alternative value database this
$a = get_option( 'upme_profile_fields' ); print_r($a); now prints
there not shows above given contents(
a:18:{ i:1;a:8:{ s:4:"type";s:8:"...... )
try :-
$a = get_option( 'profile_fields' ); print_r($a); // find value want un-serialize, then, set below $arr = $a["your value key"]; $profile_arr = unserialize($arr); print_r($profile_arr); php database wordpress
No comments:
Post a Comment