Introduction to PHP 2/13
Why Learn PHP?
"So what?" You might say. "I can do that withJavaScript." And that's true! But JavaScript's knowledge can be limited.
JavaScript generally runs in the browser, orclient. This means it only really knows what's going on in your browser, plus whatever information it gets from the website(s) you're connecting to.
PHP, on the other hand, runs on the same computer as the website you're visiting, which is known as the server. This means that it has access to all the information and files on that machine, which allows it to construct custom HTML pages to send to your browser, handle cookies, and run tasks or perform calculations with data from that website.
Instructions
We've written a little PHP in the editor to the right, but it's not complete! On line 8, type
Myfirst line of PHP!
between the ""
s.<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>
<?php
echo"My first line of PHP!"
?>
</p>
</body>
</html>
Comments
Post a Comment