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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
JD* Posted April 16, 2009 Share Posted April 16, 2009 Look into strpos Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.