Displaying first 20 characters of a comment

From: Date: Thu, 19 Dec 2002 10:03:13 +0000
Subject: Displaying first 20 characters of a comment
Groups: php.general 
Request: Send a blank email to php-general+get-128825@lists.php.net to get a copy of this message
Hi. I am trying to find out what the best way is to display only the first 20 or so characters of a comment. The comments which are entered separately by users are stored in a MySql database. I am displaying a list of the last 5 entries on the home page and then linking them to the relevant comments and details. However the comments are to long so I want to display only the first portion, kind of like a intro for users to get an idea and then read further. I am not sure if it is best to do it with the select statement or format it with the PHP. Either way I am not sure how. many thanks Kevin

« previous php.general (#128825) next »