Here is my code:
if(isset($_POST['check']) AND $_POST['check'] == 'First') {
$errormessage = array();
if(empty($_POST['full_name']) || strlen($_POST['full_name']) < 4) {
$errormessage[] = "FEL - Vänligen ange fullständiga namn. Please enter atleast 3 or more characters for your name";
}
if(!isEmail($_POST['usr_email'])) {
$errormessage[] = "FEL - Invalid email address.";
}
if(empty($errormessage)) {
echo 1;
} else {
echo $errormessage; // <--
}
}
When echo $errormessage
runs it outputs Array
. What am I doing wrong?