if ($problems[0]) { $errortable = " "; for ($i; $i<=count($problems); $i++) { $errortable .= ""; } $errortable .= "
There was an Error with the following field, please correct it:
    ".$problems[$i]."
"; echo $errortable; }