phposh Posted December 10, 2007 Share Posted December 10, 2007 hi, I want to display some data from database in a HTML table. if data is too long even if I said table width 100% whole table expands to fit the table data. Normally table data is long URL descriptions,so it doesn't divide into 2-3 lines in same row. I tried using str_replace thin g, it doesn’t work either. for example: i used $SummURL->URL_Requested = http://www.phpfreaks.com/forums/index.php?action=post;board=1.0.kkdfhldsahfkldaghkfajgkroioriorig <table width="100%"> <caption><b> Links Clicked </b></caption> <tr style="font-weight: bold;"><th class="evenrow" style="width: 25%;">No. Clicked</th><th class="evenrow" style="width: 75%;">URL</th></tr> <?php if (!$SummURL->eof()){?> <?php while(!$SummURL->eof()){?> <tr> <td class="evenrow" style="text-align: left;"><?php echo $SummURL->Count;?></td> <td class="evenrow" style="text-align: left;"><?php echo str_replace("&","<span class='noprint'></span>",$SummURL->URL_Requested);?></td> </tr> <?php $SummURL->movenext();} ?><?php } ?> </table> please help me thanks Quote Link to comment https://forums.phpfreaks.com/topic/80950-fit-some-long-php-data-in-html-table/ Share on other sites More sharing options...
rarebit Posted December 10, 2007 Share Posted December 10, 2007 I believe it's <span> your after, it's a html question though... Quote Link to comment https://forums.phpfreaks.com/topic/80950-fit-some-long-php-data-in-html-table/#findComment-410674 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.