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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post

    certain amount of characters

    how do i make this search engine only put out a certain amount of characters in a certain $row[#] and have a '...' after that certain amount of characters???

  • #2
    New Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    <?php
    $strText 
    "Email Notification: emails sent to you whenever someone replies. Only registered users are eligible. ";
    $strLen 11// Max character length
    $strShort substr_replace($strText'...'$strLen);
    ?>
    Should do the trick

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post

    no

    no i mean like this.....
    --------------------
    http://php-forums.com/forums/showthr...&threadid=1592

  • #4
    New Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    <?php
    $url 
    "http://php-forums.com/forums/showthread.php?s=&threadid=1592";
    echo 
    substr_replace($url'...'40, -10);
    ?>


  •  

    Posting Permissions

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