Connecting Tech Pros Worldwide Help | Site Map

reverse search string function

Chris Widmer
Guest
 
Posts: n/a
#1: Jul 17 '05
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

Jørn-Inge Kristiansen
Guest
 
Posts: n/a
#2: Jul 17 '05

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
Guest
 
Posts: n/a
#3: Jul 17 '05

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