When running this (simple) code:
<?php
$array = array("Blue", "Green", "Yellow", "Pink", "");
foreach ($array as $arrayElement) {
printf("<div class = \"colorSubArea %s \" > <p> 1 </p> </div> " , $arrayElement);
}
https://jsfiddle.net/xbkky7jx/3/
the last part of my code is geting printed out. Also the loop doesn't continue after the first iteration (possibly the same cause).I am new in PHP and this is very confusing to me.