| NamePros Member Location: Florida Join Date: Apr 2008 | In layman's terms:
Static sites are made from HTML. When you type the web address you get the code that is in the file at that address. Nothing changes.
PHP is a server-side language. You never see it in the code of the web page. It is in the file on the server but when the server reads the file if it finds PHP it does whatever the code says, which may include inserting some HTML code. It takes the static HTML code and adds the HTML code from PHP and shows you the result.
Example:
<body>
<p>Welcome</p>
<p>Two plus two is <?php $number = 2+2;
echo $number; ?>
</p>
</body>
Turns into:
<body>
<p>Welcome</p>
<p>Two plus two is 4</p>
</body>
You never see the actual code (inside <?php ?>). |