Support

Account

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.