sam06 Posted April 16, 2009 Share Posted April 16, 2009 Hi there again guys Is there a way to use PHP to look for an @ symbol in a field? Basically it takes a variable, if it has an @ symbol somewhere in it, do this, otherwise do that. Any ideas? Cheers, Sam Link to comment https://forums.phpfreaks.com/topic/154384-solved-search-for-symbol/ Share on other sites More sharing options...
ober Posted April 16, 2009 Share Posted April 16, 2009 Symbols are just strings. It's the same as looking for text. Having said that, you may also want to search for HTML equivalents. Link to comment https://forums.phpfreaks.com/topic/154384-solved-search-for-symbol/#findComment-811709 Share on other sites More sharing options...
JD* Posted April 16, 2009 Share Posted April 16, 2009 Look into strpos Link to comment https://forums.phpfreaks.com/topic/154384-solved-search-for-symbol/#findComment-811711 Share on other sites More sharing options...
sam06 Posted April 16, 2009 Author Share Posted April 16, 2009 Thanks for the tip- I used $mystring = $email; $findme = '@'; $pos = strpos($mystring, $findme); Cheers Link to comment https://forums.phpfreaks.com/topic/154384-solved-search-for-symbol/#findComment-811723 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.