Jump to content

[SOLVED] wordwrap kinda problem


DeanWhitehouse

Recommended Posts

I have this code

<?php
$sql = "SELECT * FROM news ORDER BY time DESC";
$query = mysql_query($sql);
while($rows = mysql_fetch_array($query))
{
$cont = wordwrap($rows['content'],3,"...");
echo $cont;
}
?>

 

and this outputs,

hel...ooo...this... etc.

 

how can i have it do

 

hel...

 

and stop after the

...

Link to comment
https://forums.phpfreaks.com/topic/114524-solved-wordwrap-kinda-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.