<?PHP
$signup_errors = array();
$signup_errors['captcha'] = 'test 1';
$signup_errors['something'] = 'test 2';
$signup_errors['another'] = 'test 3';
$signup_errors['getthepoint'] = 'test 4';
//this would work
if (isset($signup_errors) && in_array('test 4', $signup_errors)){
echo 'it works';
}
//However I need something like this to work
if (isset($signup_errors) && in_array('captcha', $signup_errors)){
echo 'it works';
}
?>
the ultimate goal here is to have a html form where I can change the css div class name is there is an error array item that exist, so if it comes back with this
$signup_errors['captcha'] = 'Please enter the correct security code';
Then on a form filed I would have something like this
<input type="text" class="textarealong <?PHP if (isset($signup_errors) && in_array('captcha', $signup_errors)){echo 'error-class';}?> " value=''>