Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

reverse search string function

Question posted by: Chris Widmer (Guest) on July 17th, 2005 12:15 AM
hello,

i was looking for a function that easily searches a sting backwards -
just like stripos but reversed. is there already one part of php or does
anyone have a nice function written?

thanks,
Chris

Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Jørn-Inge Kristiansen's Avatar
Jørn-Inge Kristiansen
Guest
n/a Posts
July 17th, 2005
12:15 AM
#2

Re: reverse search string function
stripos(strrev($string), strrev($needle);

"Chris Widmer" <pogo@gibts.net> wrote in message
news:bl8qeu$fji$3@newsserv.zdv.uni-tuebingen.de...[color=blue]
> hello,
>
> i was looking for a function that easily searches a sting backwards -
> just like stripos but reversed. is there already one part of php or does
> anyone have a nice function written?
>
> thanks,
> Chris
>[/color]



Jason's Avatar
Jason
Guest
n/a Posts
July 17th, 2005
12:16 AM
#3

Re: reverse search string function
"Jørn-Inge Kristiansen" <jorninge@stud.ntnu.no> wrote in message
news:bl98i9$29v$1@tyfon.itea.ntnu.no...[color=blue]
> stripos(strrev($string), strrev($needle);
>
> "Chris Widmer" <pogo@gibts.net> wrote in message
> news:bl8qeu$fji$3@newsserv.zdv.uni-tuebingen.de...[color=green]
> > hello,
> >
> > i was looking for a function that easily searches a sting backwards -
> > just like stripos but reversed. is there already one part of php or does
> > anyone have a nice function written?
> >
> > thanks,
> > Chris
> >[/color]
>
>
>[/color]

That's pretty cool :)



 
Not the answer you were looking for? Post your question . . .
169,970 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors