sungpeng Posted June 4, 2009 Share Posted June 4, 2009 <table width"500"><tr><td width"500"> <?php $selectquerys = "SELECT * FROM users where llid='$llid'"; $results = mysql_query($selectquerys); $rows = mysql_fetch_array($results); echo "$rows[description]<br/>"; ?></td></tr></table> Have some problem with table width. If like say my $rows[description] length is longer than table length width="500", I need it to go to the next row. Currently it will auto increase the table width to the $rows[description] length? why is that so? Can anyone help pls? ??? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 4, 2009 Share Posted June 4, 2009 Learn HTML. width="500" See the equal sign? Quote Link to comment Share on other sites More sharing options...
sungpeng Posted June 4, 2009 Author Share Posted June 4, 2009 sorry I got the "=" sign but the same problem still exist? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 4, 2009 Share Posted June 4, 2009 Is $rows['description'] one long string? I think this is more of a CSS issue. Quote Link to comment Share on other sites More sharing options...
sungpeng Posted June 4, 2009 Author Share Posted June 4, 2009 is a very long varchar 250 characters Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 4, 2009 Share Posted June 4, 2009 Wow. Um... I guess you can either cut the string into pieces and putting a <br /> for line break or use CSS overflow. Though overflow doesn't wrap the text. Read up on str_split for the first method. I don't know if there is some CSS that will do this for you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.