Learning HTML – Subpost 4

17 Mar

Today I will be covering the basics of PHP, and what it does. My reference for this part of the study is http://www.killersites.com/PHP/, which is a credible source because, well, their stuff works.

PHP is a popular web language along HTML/CSS and Javascript because it allows for form processing, “easy to learn and use” and provides a way to do “server-side” actions. In order to run PHP scripts, however, the server must support the ability to “interpret” PHP – that is, “translate” the PHP to machine-understandable code.

PHP is convenient since it can be embedded in HTML. For example, on their website, they provide the sample code:

<body>

<?PHP

print ‘My first PHP script!’;

?>

</body>

This is interesting since the syntax of PHP uses the open/close tag system of HTML. And of course, the code snippet does exactly what it says when run: it prints “My first PHP script!” The important thing, however, is to save the site as a .php, not as a .html. This is important. Because how else would the server know to anticipate php code?

Part 3 of the tutorial is “coming soon” (I am not to sure how soon, though), but I did learn a lot about introductory php in this lesson. I learned how to run and implement it on my own machine, and I also learned about a couple of commands such as strlength(); overall, the language seems to be similar to the other languages I have been introduced to.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: