Skip to content

The Basics of PHP

April 5, 2009
tags: ,

This is a guide that intends you teach you the basics of PHP coding language, and with a knowledge so thorough that you will be able to immediately start to code a major project.

Persevere, learn it, understand.

Understanding PHP

What is PHP? What can it do? This section provides useful links on reading crucial information on understanding how powerful the engine is, what it can do, and provides a comfortable bedding for future knowledge.

PHP – Wikipedia – a simple understanding of how the engine works

PHP: General Information – a overview on what it can do from people who made it

What is PHP? – an overview from the Tech Republic

What is PHP? – an overview from the Software Projects

Introduction to PHP – a easy quick bulleted overview from W3 Schools

PHP Builder – The ABCs of PHP – very long article on PHP, just read the beginning

In the Beginning

How do I set up a PHP file? What do I do with it? Do I need to configure anything on my server? This section provides information and useful links on understanding how PHP parsers work, where you can find it, and more information as well.

To cut quickly to the core, a PHP file has the extension of .php. Basically, most web hosts out there have PHP as well as other scripting languages and engines like Perl and MySQL installed, so if you are using a larger web host that’s out there, you don’t need to worry much about this.

Writing a .php file is not hard, in fact, you can even use Notepad or a super-basic text editor to write it. All you need to do is save it with the extension of .php and upload it to your server.

It’s important to keep in mind that like any coding, you should never use a rich-text editor like Microsoft Word as they add in formatting that makes it unreadable by the server.

It’s also important to note that all the scripting happens at the server; nothing is over at the user. You can’t disable it like you can with Javascript because by the time the user gets it, it’s a HTML file. This is all seamless.

Whenever you write PHP code, you include it in between PHP brackets, and the PHP engine will parse them. HTML code can exist inside a .php file, but it has to be outside of the brackets or the computer will read it and get confused. The only exception is if you are echoing it (more on that later).

 <?php // your code here ?>

PHP File Extension – so non-techies know what the mysterious file is

PHP: What Can It Do – it’s here for a reason

Advertisements
One Comment leave one →
  1. October 18, 2009 7:54 pm

    This is a great starter tutorial for people who want to learn php, and if I did not know php basics already, I would probably use it. Good job!

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: