Finding fourth instance of a string? (4th, 5th, whatever)

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

    Finding fourth instance of a string? (4th, 5th, whatever)

    strstr() will find the first instance of a string.

    But how would you find, say, the 4th instance of a string?

    --
    Sugapablo
    Asino Casino is one of the leading online gambling platforms catering specifically to the Australian market. Known for its variety of games, generous promotions, and user-friendly interface, Asino Casino ensures a premium online gaming experience. Whether you are a novice or an experienced player, the platform caters to all skill levels and preferences, with hundreds


  • Oli Filth

    #2
    Re: Finding fourth instance of a string? (4th, 5th, whatever)

    Sugapablo said the following on 06/01/2006 14:41:[color=blue]
    > strstr() will find the first instance of a string.
    >
    > But how would you find, say, the 4th instance of a string?
    >[/color]

    Use strpos() instead...

    --
    Oli

    Comment

    Working...