So basically, I am simply trying to search for a string within a string.
Although, it is a little trickier than that.
I have three small strings, one
, two
, three
And I have one large string, which is saved as a variable and is quite long.. A few paragraphs long actually.
I need to create a function that allows me to see which string occurs first.
For example, a string like this:
Hello, testing testing one test some more two
Will return one
since it occurred before two
.
Another example:
Test a paragraph three and testing some more one test test two
Will return three
since it occurred before both one
and two
.
Does anyone have any suggestions or examples on how to do this? Very new to PHP and not to sure how to go about doing this. Thanks!