I'm using Advanced Custom Fields. I was looking at the database and found the following data. How can I decode this data into PHP array?

I have tried doing json_decode in PHP and it doesn't return anything.

a:7:{s:4:"type";s:13:"photo_gallery";s:12:"instructions";s:0:"";s:8:"required";i:0;s:17:"conditional_logic";i:0;s:7:"wrapper";a:3:{s:5:"width";s:0:"";s:5:"class";s:0:"";s:2:"id";s:0:"";}s:7:"fields[";a:1:{s:10:"edit_modal";s:7:"Default";}s:10:"edit_modal";s:7:"Default";}

1 Answers

1
Navneil Naicker On

I would used ACF helper function get_field_object. All you have to do is pass field_key and it will return an array. I'm sure you can get the field key from the same row.