-   Programming (
-   -   PHP: limiting amount of text printed (

jme 11-13-2004 06:19 AM

PHP: limiting amount of text printed
Hiya guys,

I am in the process of re-writing one of my sites in PHP using MySQL for the dynamic content. I have a table within my database that I store 'news' items that I show on a specific page within the site but I would like to show maybe the first 200 characters of the article on the front page, but I cannot work out hoiw to limit the output of the MySQL query to only 200 characters.

Any advice would be greatly appreciated.


david_ross 11-13-2004 08:13 AM

Take a look at the SUBSTRING function:

All times are GMT -5. The time now is 05:06 AM.