0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

SOLVED Limit PHP Echo Call

    • Carl V's Avatar
    • Carl V
    • Sr. Rocketeer
    • Posts: 148
    • Thanks: 1
    • Real Estate Investor

    SOLVED Limit PHP Echo Call

    Posted 14 years 5 months ago
    • I'm sorry to have to do this but I've seriously checked every website and posted on other forums and no response.

      I'm trying to limit the php echo call of the description to about 80 characters

      This is the original code
      Code:
      <?php echo JText::_($item->description). '<br>' ?>

      but I don't know how to put the subtract string in or limit the output of the echo to 80 characters.

      I've done research online but I can't figure how to write it correctly.

      Please help
    • Last Edit: 14 years 5 months ago by Carl V.
    • Carl V's Avatar
    • Carl V
    • Sr. Rocketeer
    • Posts: 148
    • Thanks: 1
    • Real Estate Investor

    Re: SOLVED Limit PHP Echo Call

    Posted 14 years 5 months ago
    • Got a solution...
      <?php echo substr($item->description, 0, 80); ?>

Time to create page: 0.054 seconds