Ravens PHP Scripts

What PHP does
Date: Thursday, November 04, 2010 @ 00:05:42 PDT
Topic: PHP


You can think of PHP as a general purpose computing language if you want to, but it was designed with one task in mind and it is almost exclusively used for that task - generating web pages. So while it might be more flattering to PHP to introduce it in the widest possible context this would be misleading and it would make the job of learning how to use it harder than it needs to be.

So let's say the obvious to make it 100% clear.

* PHP is a language that creates web pages.

What this means in practice is that a PHP program's objective in life is to generate HTML or Javascript or anything else that you might find in a web page. In most cases and certainly when you are first learning PHP the web technology that is used is HTML.

Again to state the obvious:

* The output of a typical PHP program is HTML

This means that to make any sense of PHP you also have to know about the web technology that the program is generating, and in particular HTML. In practice this shouldn't be a huge problem because HTML isn't difficult and mostly the way that PHP makes use of it is fairly simple. However, it is important to know that it is possible that you could have a problem with understanding a PHP program simply because you can't understand the HTML it is generating.

more: i-programmer








This article comes from Ravens PHP Scripts
http://www.ravenphpscripts.com

The URL for this story is:
http://www.ravenphpscripts.com/modules.php?name=News&file=article&sid=3853