using HTML inside PHP?

  • Thread starter Thread starter ShadowWaste
  • Start date Start date
S

ShadowWaste

Guest
Hello, I've starting learning PHP. I have some experience with HTML. How do you combine the two? Let's say I want to display an image based on something that comes from php code? I can't seem to use <img src> tag.. How do you guys actually design/develop the GUI of the website? I'm starting to think I won't use any HTML codes and instead will learn a whole new php method to do this? thanks - Newbie
 
use the echo command:

echo "<h1>Hello World!</h1>";

The above will be the HTML equivalent of: <h1>Hello World!</h1>

For an echo block:

echo('
Block of HTML
to be enclosed...
');

Keep in mind I've used spaces instead of tabs... use spaces and your PHP will be angry...

If I haven't explained it very well (which I know I haven't), you can check out the link I will post in my source.

EDIT: Ah, so my spaces didn't show up.... excellent.

Just use the link =/ I tried

Good luck!
 
Back
Top