How can I search a string for the @ character? I want to search an array element for the @. If it exists, do some stuff, if not, do some other stuff.
I did some reading about regular expressions (Perl), but that stuff confuses the crap out of me.
A string or an array? In PHP strings arent quite arrays.
If you're searching a string, use [man]strpos/man and do a type-sensitive test against false. If you're searchin an array, use [man]in_array/man, or use [man]array_search/man like strpos().
Excellent - that worked. Thanks - I was dreading having to use regular expressions.
And just to clerify - I'm searching a string, but the string is an element of an array.