Page 1 of 1

getting a word after a word

Posted: Mon Jul 19, 2010 10:20 pm
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

Re: getting a word after a word

Posted: Mon Jul 19, 2010 11:40 pm
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.

Re: getting a word after a word

Posted: Tue Jul 20, 2010 1:42 am
by Gargoyle
three options:
1. use strpos()/substring()
2. use explode()
3. use a regular expression