PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Now if $x is equal to "Christopher" then it will echo "Yes".
But how can I make it so if $x="Chris" it is also "Yes"? And what about "Christoph" or any other part of Christopher ?
Forgive me if I misunderstand what you said, but it appears as if that wouldn't work the way I want it to. I want it so that if X$ is equal to something like "Chr" or "Er" it will return yes. They things you posted appear as if I could only get them to work if I checked every possible combination of the word. If I'm wrong could you please show me how?
I'm sorry but I still don't understand. Are you saying that I have to check every possible combination, and should do it using substr?
That would seem rather cumbersome. Or am I missing the point all together?
Ok, I kind of got it.
My main purpose of this was to make a kind of search. The program would take a string, and if the word was in that sting, it would say "yes", and if not, it would say "No". Is there some way to use strstr() to do that? I assume I could do something with