I have a Wordpress post meta to MySql like
[{"field":"Email:1","title":"email","explanation_text":"","explanation_text_location":"","html_styling":"","text_to_display":"","show_title_field":"","pdf_file":"","pdf_file_button_styling":"","pdf_file_button_text":""}]
I need to convert it to a PHP array. I used following code to make it as an array.
$wpaf_field_title = maybe_unserialize(get_post_meta(52, '__wpaf_field_title', true));
print_r(json_encode($wpaf_field_title));
But it returns me
"[{\"field\":\"Email:1\",\"title\":\"email\",\"explanation_text\":\"\",\"explanation_text_location\":\"\",\"html_styling\":\"\",\"text_to_display\":\"\",\"show_title_field\":\"\",\"pdf_file\":\"\",\"pdf_file_button_styling\":\"\",\"pdf_file_button_text\":\"\"}]"
json_encodeyou need to usejson_decode.