Posted By

valcartei on 07/10/07


Tagged

layout wrap word-wrap


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
skywalker
vali29


word wrap


 / Published in: PHP
 

URL: http://uk.php.net/manual/en/function.wordwrap.php

word-wrap refers to forcing the text to stay within its div, instead of extending to its length, which makes a div stretch. It is a built-in function in PHP, go to the url to see its descr in the PHP manual.

  1. string wordwrap ( string $str [, int $width [, string $break [, bool $cut]]] )
  2.  
  3. Here, I use <br> to break the string $string every 20 chars.
  4. i.e.wordwrap($string,20, "<br />\n")

Report this snippet  

You need to login to post a comment.