PHP Classes

File: wrappedtext.doc

Recommend this page to a friend!
  Classes of Bas Jobsen  >  wrappedtext  >  wrappedtext.doc  >  Download  
File: wrappedtext.doc
Role: Documentation
Content type: text/plain
Description: documentation
Class: wrappedtext
Word wrap class (that skips html tags)
Author: By
Last change:
Date: 20 years ago
Size: 919 bytes


Class file image Download
How to use:

Your text: $text;

To print it wordwrapped:


$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!!
For more information send a message to info at phpclasses dot org.