Connecting Tech Pros Worldwide Help | Site Map

reverse search string function

  #1  
Old July 17th, 2005, 01:15 AM
Chris Widmer
Guest
 
Posts: n/a
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

  #2  
Old July 17th, 2005, 01:15 AM
Jørn-Inge Kristiansen
Guest
 
Posts: n/a

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]


  #3  
Old July 17th, 2005, 01:16 AM
Jason
Guest
 
Posts: n/a

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 :)


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to modify meaning of builtin function "not" to "!"? grbgooglefan answers 6 June 27th, 2008 05:25 PM
Search Box Problem nik707 answers 41 June 13th, 2008 06:26 AM
INDEX possible for reverse wildcards? Robert Brown answers 9 July 20th, 2005 04:57 AM
regular expression reverse match? Ron Adam answers 9 July 18th, 2005 05:35 AM