Re: find placement of one string in another

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, [EMAIL PROTECTED] said: >$test = "one day I went to the zoo"; > >and I want to find how many characters into $test the word "went" is, how >do I go about that? The simple index() function: if (($pos = index($test, "went")) > -1) { print "'went' was found at position $pos\n";

find placement of one string in another

2001-10-30 Thread Greg . Froese
How do I find where one string is in another? if i have $test = "one day I went to the zoo"; and I want to find how many characters into $test the word "went" is, how do I go about that? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]