if(empty($_POST) === false) {
$required_fields = array('username','password','password_again','email');
foreach($_POST as $key => $value) {
if(empty($value) && in__array($key,$required_fields) === true){
$errors[] = 'Fields marked with asterisks are required';
break 1;
}
}
}
I get this error: Fatal error: Call to undefined function in__array() in C:\xampp\htdocs...
in__array
only has one_
, not two. – Rocket Hazmat Dec 31 '12 at 14:59