Jump to content

[SOLVED] Simple solution??


timmah1

Recommended Posts

This is probably extremely simple, but I can't figure out how to do it.

I have a box that is 300px wide, and if the text inside that box is wider than 300px, I want the text to flow to the next line, so as not to stretch the box.

 

The text that is in the box comes from the database.

 

How do I force the text to only go the width of the box?

 

I'm tried this, but it's only showing the first 200 characters

$text = substr($desc,0,200);
echo $text; 

 

Thank in advance

Link to comment
https://forums.phpfreaks.com/topic/111397-solved-simple-solution/
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.