I am using the Advance Custom Fields plugin and want to read the value of the custom fields. For dropdown and text fields, this is straight forward as the value is keep in plain text, so get_post_custom_values functions works.
For multi-select field, however, ACF keeps data like this:
a:1:{i:0;s:3:"Value2";}
So the sensible thing to do is to use the get_value function from ACF to read the value and parse it into objects.
In the ACF plugin, the first line does:
$acf = new Acf();
So I assumed I could just use the $acf variable in my plugin and do:
$afc->get_value ($post_id, $key);
but received error with
PHP Notice: Undefined variable
I am new to php development so I might not have understood the scoping rule correctly. So, what's the right way to do this and what am I doing wrong?