Jump to content

[SOLVED] an simple text format question within a table ?


Recommended Posts

can someone tell me how to format my table data to courier new and the font size to 10 and the font color to green within my code. 

 

$display_block = "<p align = 'center'> <table id='mytable' class='sortable' border = '1' bordercolor = 'gray cellpadding= '0' cellspacing = '0'>
<thead>
<th  bgcolor = 'orange'>Item Number</th>
<th  bgcolor = 'orange'>Manufacturer</th>
<th  bgcolor = 'orange'>Category</th>
<th  bgcolor = 'orange'>Description</th>
<th  bgcolor = 'orange'>Model</th>
<th  bgcolor = 'orange'>Quantity</th>
<th  bgcolor = 'orange'>Kw</th>
<th  bgcolor = 'orange'>Hours</th>
<th  bgcolor = 'orange'>Price</th> 
</thead>
<tbody>";
//if authorized, get the values
while ($info = mysqli_fetch_array($result)) {

//create display string
$display_block .= "
<tr>
<td>".$info['Item_No']."</td>
<td>".$info['Manufacturer']."</td>
<td>".$info['Category']."</td>
<td>".$info['Description']."</td>
<td>".$info['Model']."</td>
<td>".$info['Qty']."</td>
<td>".$info['Kw']."</td>
<td>".$info['Hours']."</td>
<td>".$info['Price']."</td>
</tr>";
}
$display_block .= "</tbody></table></p>"; 

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.