reverse search string function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Widmer

    reverse search string function

    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

    #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]


    Comment

    • Jason

      #3
      Re: reverse search string function

      "Jørn-Inge Kristiansen" <jorninge@stud. ntnu.no> wrote in message
      news:bl98i9$29v $1@tyfon.itea.n tnu.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 :)


      Comment

      Working...