Re: Get First 20 Characters of a Variable or Database Entry
| From: | John W. Holmes | Date: | Thu, 22 Jan 2004 00:53:59 +0000 |
| Subject: | Re: Get First 20 Characters of a Variable or Database Entry | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175378@lists.php.net to get a copy of this message | ||
Dimitri Marshall wrote:
How would I go about getting the first 20 characters of a varibale or database entry. The situation is this, I created a calendar where users can post events and on the date instead of just a number (the number of events and the date), I would like to show the first 20-30 characters of the event name. I could do the whole event name but it could get quite long.LEFT() in your query or substr() in PHP. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com