Jump to content

preg_match


jaymc

Recommended Posts

I want to check a variable to see if it contains any of the following chars

[code]&
?
/
\
=
'
"
,
%
+
`
[/code]

I think its best to use preg_match but I'm just a little unsure how to set it all out

I know the syntax ... preg_match("banned chars", $var);

I just dont know how to format the banned chars in the function

Any help?
Link to comment
https://forums.phpfreaks.com/topic/28285-preg_match/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.