Nandini Posted March 22, 2011 Share Posted March 22, 2011 Hi i want to match $ symbol from the string. I am using the following script $str="ckj"; if(preg_match("/^$/",$str)) { echo "Dollar is found"; } else { echo "Not Found"; } Its not working fine. Can anyone help me out please. Link to comment https://forums.phpfreaks.com/topic/231367-match-dollar-symbol-using-preg_match/ Share on other sites More sharing options...
MrXHellboy Posted March 22, 2011 Share Posted March 22, 2011 preg_match('@\$@', $str) Link to comment https://forums.phpfreaks.com/topic/231367-match-dollar-symbol-using-preg_match/#findComment-1190747 Share on other sites More sharing options...
Nandini Posted March 22, 2011 Author Share Posted March 22, 2011 Superb Working fine thanq very much Link to comment https://forums.phpfreaks.com/topic/231367-match-dollar-symbol-using-preg_match/#findComment-1190751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.