The HTML markup
and the PHP
Are performing entirely different roles.
PHP is an embedded scripting language, meaning that it can be interspersed with HTML markup, it is in no way a direct replacement for HTML markup.
<?php is the opening tag tells the PHP interpreter that what is coming up is to be interpreted as PHP, rather than just left untouched. ?> is the closing tag, saying that, after this point leave the output alone.
echo is a global PHP function that causes the subsequent argument to be output.
Here are just a few examples, they achieve exactly the same result.
//all HTML
//All PHP
Code:
<?php
echo "<p>lorem ipsum</p>";
?>
//A mix of both
Code:
<p><?php echo "lorem ipsum"; ?></p>
As you are ultimately creating an HTML web page, there is no special way to include a style sheet, you just construct the usual HTML markup.
So, I'm not quite sure I understand where the misunderstanding is getting in, and I hope that somehow starts clearing up the mystery?
Bookmarks