Support forum login

©2006-2012 IAAI Software

Contact Us Privacy Policy

Deccrementing text

Submitted by camchoice on Wed, 2007-10-31 13:36.

How do I decrement text, for example if a parsed text consists of 20 charachters and I only want to display 5

like :

thisisaverylongtext
becomes
thisisavery...

Submitted by support on Wed, 2007-10-31 14:29.

Hi,

Just use substr(), for example:

$text = substr(0,10,$text);

...or if you just want to print out the first 5 characters of a parsed field:

  print substr(0,5,$record["SOME-FIELD"]);

Cheers,
David.