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? ??? Link to comment https://forums.phpfreaks.com/topic/160882-table-width-problem/ 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? Link to comment https://forums.phpfreaks.com/topic/160882-table-width-problem/#findComment-849036 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? Link to comment https://forums.phpfreaks.com/topic/160882-table-width-problem/#findComment-849037 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. Link to comment https://forums.phpfreaks.com/topic/160882-table-width-problem/#findComment-849038 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 Link to comment https://forums.phpfreaks.com/topic/160882-table-width-problem/#findComment-849041 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. Link to comment https://forums.phpfreaks.com/topic/160882-table-width-problem/#findComment-849048 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.