Variable help
Posted: Tue Oct 12, 2010 3:27 am
Hi, I'm looking for a solution to my problems. I want to search a variable to see if it contains a certain string amongst others. This is basically what I mean:
Let's say
If I wanted to check if the variable contains "Alex" or not, how would I proceed?
EDIT: Sorry, I forgot strpos.
Please close this.
Let's say
Code: Select all
$names = "Fred, Tom, Jill, Alex";EDIT: Sorry, I forgot strpos.