What function(s) do I use?

Discussion in 'PHP' started by kuttappan, Jun 22, 2010.

  1. #1
    I would like to take a string and remove the first 5 characters from the string. I would like to have the remaining portion of the string returned (not the first 5 characters). I want to do the same thing with the end of the string except remove the last 16 characters.

    What two functions would I use to do this?
     
    kuttappan, Jun 22, 2010 IP
  2. Michellu

    Michellu Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To remove the first five characters use substr($string, 5)
    To remove the last 16 characters use substr($string, 0, -16)
     
    Michellu, Jun 22, 2010 IP