Created
February 9, 2015 14:42
-
-
Save johnsonch/9e43ba64dac7b6c12db5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<?php | |
$error_messages = array(); | |
array_push($errors, 'Some error'); | |
array_push($errors, 'Another error'); | |
array_push($errors, 'Wow this is bad'); | |
?> | |
<h1>My great error list</h1> | |
<?php if (isset($errors) && count($errors) > 0) : ?> | |
<h3>There were errors that prevented the form from doing the thing</h3> | |
<ul class="errors"> | |
<?php foreach($errors as $error) : ?> | |
<li><?= $error; ?></li> | |
<?php endforeach; ?> | |
</ul> | |
<?php endif; ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment