Hi there, am new to website design and fighting with an error message which I am not sure how to resolve. Can anyone offer any help on this please. Thank you
"Warning: preg_replace(): Unknown modifier '<' in /usr/www/users/datatrf/feedback_form.php on line 13"
PHP ERROR
Adding to above, my line 13 looks like this:
return preg_replace('/[nr|!/<>^$%*&]+/','',$form_field);
- Edited
You need a \
before the literal /
in your regex so that it is not interpreted as the end-of-pattern indicator.
PS: Or you could change the opening and closing /
pattern delimiters to some other acceptable character, e.g.:
preg_replace('#[nr|!/<>^$%*&]+#', '', $form_field);
Thanks Nogdog That solved the issue