Deccrementing text
Submitted by camchoice on Wed, 2007-10-31 13:36.Magic Parser
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...
Support forum loginActive forum topics©2006-2012 IAAI Software |
Deccrementing textSubmitted by camchoice on Wed, 2007-10-31 13:36.Magic Parser
How do I decrement text, for example if a parsed text consists of 20 charachters and I only want to display 5 like : thisisaverylongtext |
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.