HTML Code in PHP
Moderator: General Moderators
HTML Code in PHP
I'm not a programmer by nature, but I'm struggling to learn PHP. I'm wondering how to format echo (or other) statements in a particular font/color/size? In the areas before/after my php script, I've got a certain font, but within the script the text doesn't match. I don't have particular code in mind, but am just looking for a general way of doing this.
-
JPlush76
- Forum Regular
- Posts: 819
- Joined: Thu Aug 01, 2002 5:42 pm
- Location: Los Angeles, CA
- Contact:
I usually do all my html formatting outside of php
IE
IE
Code: Select all
<font size="2" color="#000000">
<? echo $variable; ?>
</font>alright, here's the idea: php writes the page that controls the browser - it doesn't do it itself. Want to make red text in an html page? it looks like this: Want red text from an echo statement? See, you just use PHP to echo HTML? If you don't know HTML well, then an echo statement's not going to help you.
Code: Select all
<font style="color:red">RedTextIsSoRad</font>Code: Select all
echo '<font style="color:red">RedTextIsSoRad</font>';