php trim

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

    php trim

    Hi Guys,

    Just a quick question
    I have a string that I want to cut the last 5 characters off.
    How do I go about this.

    Many thanks

    Alex Kemsley

  • naixn

    #2
    Re: php trim

    alex.kemsley wrote :
    Hi Guys,
    >
    Just a quick question
    I have a string that I want to cut the last 5 characters off.
    How do I go about this.
    >
    Many thanks
    >
    Alex Kemsley
    >
    $text = substr($text, 0, -5);

    Here you are :)

    --
    Naixn

    Comment

    • alex.kemsley

      #3
      Re: php trim


      naixn wrote:
      alex.kemsley wrote :
      Hi Guys,

      Just a quick question
      I have a string that I want to cut the last 5 characters off.
      How do I go about this.

      Many thanks

      Alex Kemsley
      >
      $text = substr($text, 0, -5);
      >
      Here you are :)
      >
      --
      Naixn
      http://fma-fr.net
      Many thanks, Works perfect.

      Alex

      Comment

      Working...