anyone know how to search a variable for a specific character? cos i want to make sure that the email people add in has the @ symbol init, crude i know but its just a simple check. really, i just need the search variable for specific text or symbols for future reference.
strpos($emailaddress,"@") will return the position of the '@' character or FALSE (or zero) if the character isn't there.
Things can get confusing if the character you are searching for is the first character, as the position returned will be zero.
ah so i could simply do:
if (strpos($emailaddress,"@")) { // email is valid } else { Your email is wrong }
Yep, that should do the trick.
right okies then, thanks alot!