Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Trim a line of text to X characters (See related posts)

Trim a line of text to X characters

   1  
   2  <? $varshort = substr($var,0,25); echo "$varshort"; ?>

You need to create an account or log in to post comments to this site.


Click here to browse all 5555 code snippets

Related Posts