This topic is locked

Validate Fields

11/2/2011 1:27:01 PM
PHPRunner General questions
S
stiven author

Hello,
I need to validate the fields of a form to check that they dont have any apostrophes " ' " i know i can do it through regular expressions but i have about 80 fields on that table.. is there a way to do this better? like loop through each value or something?
Thanks..

C
cgphp 11/2/2011
foreach($values as $k => $v)

{

$values[$k] = preg_replace('/\'/', '', $values[$k]);

}