Jump to content

[SOLVED] Include font and font size in php table tag


rscott7706

Recommended Posts

Hello all...  I just feel like I should be getting this, but I still struggle.  I searched using many search terms but cannot find the answer.

 

I want to place font and fonts size info in this tag:

 

echo "<table>";

 

or....

 

Put the id "board" in the tag so I can reference my CSS sheet.

 

Either one would be fine - with CSS best.

 

 

Here is my total code (sans connection info):

 

<?php

echo "<table>";

$query = mysql_query("SELECT `title`, `fname`,`lname` FROM board ORDER by 'sort'");

while(list($title, $fname, $lname)=mysql_fetch_row($query)){

echo "

<tr>

<td valign='top' width='35%'>$fname $lname

</td><td valign='top' width='65%'>$title</td></tr>";

}

echo "</table>";

?>

 

Thanks, hope someone can help!

 

8)

Ron Scott

 

 

 

GingerRobot, thanks for your quick reply...

 

'<table id="board">';

 

The table call is in an echo call.

 

echo "</table>";

 

If I use the html call id="board", it crashes the PHP code and I get a php error:

 

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/lakesie7/public_html/iframe_files/board-13.php on line 80

 

I tried that and various id=/"board/", etc...

OK, it is not as I am not trying to do myself, i know it may seem that way.  I have been on it for hours.

 

My dilema is that the table tag will take certain attributes, not others:

 

echo '<table width="350" font size="3" color="red">';

 

Table width works great, but not font or size.

 

another:

 

<td valign='top' width='65%' color='E4CAB' font-size='10pt'>

 

Again valign works fine, width works fine, but not font or color.

 

I know I am not an expert and honestly I understand if you think I need to learn more on my own!!

 

Thanks anyway.

 

Ron Scott

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.