What am I doing wrong? Just to warn you this is my first attempt at php so pardon my ignorance ;)
Currently using Wordpress with a plugin called Advanced Custom Fields. Which allows you to create custom field options in the backend of wordpress.
http://plugins.elliotcondon.com/advanced-custom-fields/
I am trying to get a div to hide if the value of the Advanced Custom Field "Available" (which is a select list) is set to "No". The div is a marker for the 10 available apartments that overlays a map. Currently it displays all 10 markers whether it's availability is set to "No" or "Yes".
$i = 201;
$available = get_field('available');
while ($i <= 210) :
if ($available == 'No') {
echo '<div id="apt-' . $i . '" class="map-marker" style="display:none;"></div>';
} elseif ($available) {
echo '<div id="apt-' . $i . '" class="map-marker">';
echo $i++;
echo'</div>';
}
endwhile;
$available