Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Substr help

  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    96
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Substr help

    Sup.

    I believe I did this with substr's a while ago, but forgot how.

    I want the variable to only echo out..say 5 letters. And at the end it will have "..." without the quotes.

    I completely forgot how to do this.
    Can anyone "refresh" my mind?

    Thanks.

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Crisp View Post
    Sup.

    I believe I did this with substr's a while ago, but forgot how.

    I want the variable to only echo out..say 5 letters. And at the end it will have "..." without the quotes.

    I completely forgot how to do this.
    Can anyone "refresh" my mind?

    Thanks.
    PHP Code:
    $shorter substr($longer,0,5); 
    http://www.php.net/manual/en/function.substr.php

    best regards

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    96
    Thanks
    8
    Thanked 0 Times in 0 Posts
    That works.
    Thanks dude.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •