Page 1 of 1

Brain Fart

Posted: Sun May 25, 2003 2:18 pm
by Jade
Hey,

I can't remmber the function that you use when you don't want to display a whole big long thing of text. Like in those news articles where they have some of the article and then they put the ellipses (...) so that it doesn't display the whole text but a part of it with the button you can click to read the rest of it. Can any of you remember how to do this?

Jade

Posted: Sun May 25, 2003 2:29 pm
by werlop

Code: Select all

<?php
$description =  substr($row[4], 0, 200). "... [IN FULL]" 
?>
This outputs 200 characters of $row[4] and appends ... [IN FULL], where $row[4] is the full news story from a database.

You are then free to do what you want with $description.