I am trying to build a form validation that will remove tags befor submition.
My qusetion is how do I take an array and strip out all the tags and then return the array with the same name?
Name of arrays
$ca_required[]
$ca[]
My validation to check to see if keys are empty
//set variable of array keys
$array_keys = array_keys($ca);
$array_keys_required = array_keys($ca_required);
//set counter variable
$count = 0;
//check array for empty strings
for($x=0;$x<sizeof($array_keys_required);$x++)
{
if(empty($ca_required[$array_keys_required[$x]]))
{
$error[$count++] = 'error '.$array_keys_required[$x].'';
}
//check email for oformat
if(stristr($array_keys_required[$x],'ca_email'))
{
if(!valid_email($ca_required[$array_keys_required[$x]]))
{
$error[$count++] = 'Email is wrong!';
}
}
}
I would like to strip the tags out before I validate for empty keys
I would appreciate any help
Thanks