ondi Posted December 28, 2008 Share Posted December 28, 2008 I cant for the life of me change the font size in this code: <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\" > $data[opponent] </td> </tr> I've tried using font size=\"1\" but to no avail Link to comment https://forums.phpfreaks.com/topic/138632-font-sizes/ Share on other sites More sharing options...
JasonLewis Posted December 28, 2008 Share Posted December 28, 2008 Try this: <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\" > <span style=\"font-size:14px\">$data['opponent']</span> </td> </tr> Also. When using associative arrays, always remember to surround the name of the key with quotes. This will ensure that PHP doesn't confuse it with a constant. Link to comment https://forums.phpfreaks.com/topic/138632-font-sizes/#findComment-724839 Share on other sites More sharing options...
ondi Posted December 28, 2008 Author Share Posted December 28, 2008 No luck with that ProjectFear, I get: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/fhlinux222/w/walthamforest-fc.co.uk/user/htdocs/stats/newplayer.php on line 355 Link to comment https://forums.phpfreaks.com/topic/138632-font-sizes/#findComment-724841 Share on other sites More sharing options...
Noskiw Posted December 28, 2008 Share Posted December 28, 2008 try <?php echo "<tr>\n"; echo "<td align=\"left\" valign=\"middle\" bgcolor=\"$temp\" >\n"; echo "<span style=\"font-size:14px;\">".$data['opponent'] ."</span>\n"; echo "</td>\n"; echo "</tr>\n"; ?> Link to comment https://forums.phpfreaks.com/topic/138632-font-sizes/#findComment-724842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.