How to use:
Your text: $text;
To print it wordwrapped:
include('wrappedtext.php');
$WRAPPEDTEKST=new wrappedtext($text,$maxlength,$length,$endline,$safe_returns,$striphtml,$allowed_tags,$maillink,$urllink,$target);
$maxlength, maxium length of the words you will allow.
$length, split word long then $length in to piece of $length.
$length, separator, b.e. <br> or \n
$safe_returns, set to 1 if you want to change \n to <br>
$striphtml, set to 1 if you want to strip (some) htmlcode from your text
$allowed_tags, string of allowed tags if set $striphtml, b.e. '<a><font>'
$maillink, set to 1 if you want every emailadress in $text changed to <a href="mailto:.......
$urllink, set to 1 if you want every url in $text change to a hyperlink
$target taget for $urllink, be '_new'
NOTICE if you set maillink or urllink to 1 you have to set $striphtml to 1 also. If so don't add <a> to $allowed_tags!!
|