Quick Search:
Oracle PL/SQL Code Library
Find Or Post Oracle Jobs
Oracle Discussion & Chat
 PHP Code: Truncate text while preserving HTML tags Jump to:  
Category: >> PHP Code >> Truncate text while preserving HTML tags Bookmark and Share

<< lastnext >>

Snippet Name: Truncate text while preserving HTML tags

Description: Truncate or limit a text string while still preserving any HTML tags present. The code auto-closes the tags.

Also see:
» BR2NL Function - Opposite of NL2BR
» Truncate text while preserving HTML ta...
» Neatly trim a string to a set number o...
» Truncate Links Over X Chars long
» String Functions: LTRIM
» String Functions: RTRIM
» Number Functions: Truncate to n
» Number Functions: Truncate
» Improved Strip_Tags()
» Get text between tags
» Convert BBCode Tags
» Truncate URLs for clean appearance.

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: May 27th, 2010

ECHO String::truncate('jo<i><b>n</b>as</i>', 3, '...'); //jo<...
ECHO String::truncate('jo<i><b>n</b>as</i>', 3, '...', TRUE); //jo<i><b>n</b></i>...
ECHO String::truncate('jo<i><b>n</b>as</i>', 3, '...', TRUE, FALSE); //jo<i><b>n...

Oracle Magazine
and Oracle White Papers

SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 21 users online    © 2009 psoug.org

Forgot your password?