AlexanderBlade Posted January 15, 2015 Share Posted January 15, 2015 Hi everyone, I'm trying to get my head around blending in and out of php and html. I've seen some simple examples which work great but now I have this variable that comes from the database and I would like to style the variable in-line with html markup. Here's what I'm trying to do: <?php echo "Price : ",'<Font size="100"> $tournament["pricePerPlayer"] </font>'; ....more of the same code goes here... ?> I can't get $tournament["pricePerPlayer"] to be controlled by the font tag. How do I do this? Any help would be greatly appreciated. Thanks, Quote Link to comment Share on other sites More sharing options...
Solution CroNiX Posted January 15, 2015 Solution Share Posted January 15, 2015 The <font> tag has been deprecated from HTML5, so you really shouldn't use it. You should be using CSS to control your visual presentation. You also have mismatched font tags (opening starts with upper-case, closing is all lower-case. echo 'Price: <span style="font-size:50px">' . $tournament["pricePerPlayer"] . '</span>'; Ultimately it would REALLY be best to use a stylesheet, and then just give the span an ID or a classname, with the style for that ID/Classname defined in the stylesheet. Quote Link to comment Share on other sites More sharing options...
AlexanderBlade Posted January 16, 2015 Author Share Posted January 16, 2015 Thank you so much!! I"m embarrassed to say that I spent a few hours well on this trying all kinds of combinations. Thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.