getting a word after a word

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!

Moderator: General Moderators

Post Reply
jimgym1989
Forum Newbie
Posts: 10
Joined: Thu May 14, 2009 8:31 am

getting a word after a word

Post by jimgym1989 »

Hi there,
Is it possible to get a word after a word,
Example: MISSING ELSON JAMES DETAILS LOST IN THE DARK
I only want to get the
ELSON JAMES which is after the word MISSING
I also want to get the words
LOST IN THE DARK which is after the word DETAILS

A great help will be deeply appreciated!
Thanks in advance! :D
jimgym1989
Forum Newbie
Posts: 10
Joined: Thu May 14, 2009 8:31 am

Re: getting a word after a word

Post by jimgym1989 »

sofiadavis1 wrote:Honestly saying I ever saw this type of stuff before here and I have no more idea about this but I will try and becomes nice time pass and really good exercisers through that you can expand your dictionary .
What do you mean?
I want a solution in a PHP way.
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: getting a word after a word

Post by Gargoyle »

three options:
1. use strpos()/substring()
2. use explode()
3. use a regular expression
Post Reply