Hi I'm trying to create a database class which runs the queries. in that I sent the where condition as a parameter to a function like, id=$no AND name='vig'
. now I want to replace the values with mysqli_real_escape_string, like id=mysql_real_escape_string($no)
. like this. how can I do that using preg_replace.
I got this regex when searching, but I don't know how to use it with preg_replace. '/(["\'])([^"\']+)\1/'