Page 1 of 1

Character display

Posted: Tue Dec 03, 2002 9:14 pm
by thoughtriot
I have a test field called Entry for a news table, and I was wondering how I could put a little "preview" of the latest entry on a page where only x amount of letters/characters are displayed, then I'll just put a "Read more >" link or something. But how would I only display 50 or so characters, please?

Posted: Wed Dec 04, 2002 4:11 am
by twigletmac
You'd want to either limit how much of the string you either selected or output. Take a look at:
LEFT(): http://www.mysql.com/doc/en/String_func ... ml#IDX1175
or for a PHP version:
substr(): http://www.php.net/substr

Mac