rscott7706 Posted July 17, 2008 Share Posted July 17, 2008 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! Ron Scott Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/ Share on other sites More sharing options...
GingerRobot Posted July 17, 2008 Share Posted July 17, 2008 So what's the problem? echo '<table id="board">'; Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592798 Share on other sites More sharing options...
rscott7706 Posted July 17, 2008 Author Share Posted July 17, 2008 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... Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592806 Share on other sites More sharing options...
compguru910 Posted July 17, 2008 Share Posted July 17, 2008 Try echo "<table id=\"board\">"; Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592807 Share on other sites More sharing options...
GingerRobot Posted July 17, 2008 Share Posted July 17, 2008 Or try, as i posted, enclosing the string to be echoed in single quotes, so that double quotes may be echoed without escaping them. Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592813 Share on other sites More sharing options...
rscott7706 Posted July 17, 2008 Author Share Posted July 17, 2008 Thanks GingerRobot, How about putting the font & or font size tags in there? Sorry to be a bother. Ron Scott Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592819 Share on other sites More sharing options...
GingerRobot Posted July 17, 2008 Share Posted July 17, 2008 Why don't you have a go and post if can't figure it out. Though, as you said earlier, it would be better to put your font styling in a separate CSS file. Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592840 Share on other sites More sharing options...
rscott7706 Posted July 17, 2008 Author Share Posted July 17, 2008 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 Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592859 Share on other sites More sharing options...
unkwntech Posted July 17, 2008 Share Posted July 17, 2008 Font color and size tags used in either <font> or in css. But not in any other tags. Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592863 Share on other sites More sharing options...
rscott7706 Posted July 17, 2008 Author Share Posted July 17, 2008 Thank you - everyone for your help. Why I don't know, but I switched stye sheets, now it is linking ok. Just have to customize this one and will be good to go. Thanks Again. Ron Scott Link to comment https://forums.phpfreaks.com/topic/115305-solved-include-font-and-font-size-in-php-table-tag/#findComment-592869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.