I have this function in my code:
function elseif_badform($thekey, $thevalue, $pattern)
{
if ($thekey == $thevalue)
{
if (!ereg("^[A-Za-z0-9_ -]+[\.]?[A-Za-z0-9 -]+@.+\\..+$",$HTTP_POST_VARS["$thevalue"]))
{
$bad_format["$thevalue"] = "bad";
}
}
}
If $thevalue equals 'email', how can I use sizeof($bad_format) or echo $bad_format['email'] outside the function?