How to get data out of a custom field that holds an array
-
Hi There,
So. I’ve been researching ways on how to display information from custom fields. I am currently using a custom field plugin called Magic Fields. Its pretty awesome.
Except I seem to have problems when the input of information, is an array. In this case it is a checkbox list. It seems to put this kind of data into the field. Which I found from this thread is serialized data
a:2:{i:0;s:13:"Solo Learning";i:1;s:12:"Grade School";}
I’m trying to find ways to pull one value out of this, so I can do things like:
IF this post is in THIS category AND has meta value of X display it.
This is proving to be over my head. I’ve tried some of the set-ups in wpdb, and that previous thread to no avail. So I went looking around on the internet. And evolt has a simple tutorial using unserialize.
Is there a way to use this function to help me parse the info I need? If not, does anyone have suggestions on how I can get the data I need out of this custom field?
Thanks!
Nadine
- The topic ‘How to get data out of a custom field that holds an array’ is closed to new replies.