JiveMedia
asked on
PHP If First Word Equals
Hi,
I was wondering what would be the most efficient way of finding and testing against the first word (including first white space) within a string.
So say i had a variable $a that equaled something like 'P001 example word'. If i wanted to test this true or false based on whether 'P001 ' was found and first word in the string, what would be the best way of doing so?
Any help would be appreciated.
Thanks.
I was wondering what would be the most efficient way of finding and testing against the first word (including first white space) within a string.
So say i had a variable $a that equaled something like 'P001 example word'. If i wanted to test this true or false based on whether 'P001 ' was found and first word in the string, what would be the best way of doing so?
Any help would be appreciated.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.