Hi everyone, how do I allow the use of single and double quotation marks in the code below? Thanks else if(preg_match('/[^a-zA-Z0-9?! .-]/', $message)){ echo '<h2>Enter a valid message.</h2>'; } Code (markup):
Just escape them \'\" else if(preg_match('/[^\'\"a-zA-Z0-9?! .-]/', $message)){ echo '<h2>Enter a valid message.</h2>'; } Code (markup):