
rjbathgate
User
Oct 6, 2008, 2:46 PM
Post #5 of 5
(3394 views)
Shortcut
|
|
Re: [Cliff] How to trim a field?
[In reply to]
|
Can't Post
|
|
Hi, I know this thread is really old, but I was searching for the same question - and have found a solution, so thought I'd update this thread for future readers...
<?php echo substr($tablenameRecord['fieldname'],0,100); ?> The substr returns part of a string, with the numbers at the end (0,100) defining what parts. In this example, it will return the first 100 characters, starting from the start (0). You can get more info on it (for example how to change what characters are displayed etc at: http://nz2.php.net/substr Hope it helps someone - it did me! Rob
|