Getting a substring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moishy
    New Member
    • Oct 2006
    • 104

    Getting a substring

    Iv'e been trying various methods, but their all very long...
    I am trying to get:


    Code:
    filename
    from a string like this:
    Code:
    http://www.website.com/files/[U]filename[/U].gif
    Thanks for your help,
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #2
    Hi,

    you could start looking at the stringtokenizer and/or the explode function.

    Start there.

    Cheers

    Comment

    • mwasif
      Recognized Expert Contributor
      • Jul 2006
      • 802

      #3
      Checkout basename().

      Comment

      • moishy
        New Member
        • Oct 2006
        • 104

        #4
        Never heard of
        stringtokenizer
        What's that?

        Comment

        Working...