Jump to content

fit some long PHP data in HTML table ???


phposh

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/80950-fit-some-long-php-data-in-html-table/
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.