Copyright © 2014 by tutorialspoint
preg_quote() takes str and puts a backslash in front of every character that is part of the regular expression syntax.
Returns the quoted string.
Following is the piece of code, copy and paste this code into a file and verify the result.
$keywords = '$40 for a g3/400';
$keywords = preg_quote($keywords, '/');
This will produce following result.
\$40 for a g3\/400