Thread: What is PHP?
View Single Post
Old 08-23-2008, 11:15 AM   · #13
kbweb
NamePros Member
 
Location: Florida
Trader Rating: (0)
Join Date: Apr 2008
Posts: 63
NP$: 0.00 (Donate)
kbweb is an unknown quantity at this point
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 ?>).


Please register or log-in into NamePros to hide ads
kbweb is offline   Reply With Quote
Site Sponsors
EscrowDNS RealTechNetwork Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 08:31 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.