Home › Forums › General Issues › Querying a subfield to retrieve an image › Reply To: Querying a subfield to retrieve an image
I’m afraid I don’t quite understand the issue, so please forgive me if I’m wrong.
The string you got is called serialized string. You can convert it to an array by using the unserialize() function like this:
$image_ids = unserialize($image_id); $cropped_id = $image_ids['cropped_image']
Because this is more related to PHP, for further support kindly get in touch with PHP community.
If that’s not what you want, could you please explain the issue again in more detail?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.