Hi, I am using preg_replace to escape special characters...
$tmpStr=preg_replace("/\?/", "\?", $tmpStr);
$tmpStr=preg_replace("/\#/", "\#", $tmpStr);
$tmpStr=preg_replace("/\^/", "\^", $tmpStr);
$tmpStr=preg_replace("/\&/", "\&", $tmpStr);
$tmpStr=preg_replace("/\*/", "\*", $tmpStr);
$tmpStr=preg_replace("/\(/", "\(", $tmpStr);
$tmpStr=preg_replace("/\)/", "\)", $tmpStr);
$tmpStr=preg_replace("/\//", "\/", $tmpStr);
but i am not able to escape $ using the same function
$tmpStr=preg_replace("/\$/", "\$", $tmpStr);
and also when i use the above statement all the spaces get replaced by $ and $ is not getting escaped....someone please help me with this....