Hi All. Can anyone tell me if it is poss to display only 1/3rd of a feild in db. My feild is called Description and has the text would only like to show part of this results in a quick veiw page. can i add somthing to this code?
echo '<p>' . $row ['discription'] . '</p>';
maccas
9:15 pm on Apr 1, 2007 (gmt 0)
You can do it by number of characters, i.e below would display 25 characters followed by ... $length = 25; $shortdiscription = substr_replace($row ['discription'], '...', $length); echo '<p>' . $shortdiscription . '</p>';