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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.