Home › Forums › General Issues › If statement with check box array › Reply To: If statement with check box array
Anyone on this? I know that this will return the values:
<?php
$values = get_field('services_offered');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
echo '<li>' . $value . '</li>';
}
echo '</ul>';
}
?>
But I want to show a certain image for each checkbox, so I need if and then type statements. Meaning, if this checkbox is checked, display this image.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.