PHP Fundamentals for beginners
Php or (Php Hypertext Pre-processor) is a scripting language, it requires a Stack of technologies to process the scripts on a server side and then deliver the resulting HTML output to a browser. It can also be used at the server console to perform actions on the server.
The Php index files is entitled index.php by default, however this can be altered by making changes to the Server Configuration.
The files which are interpreted are mainly *.php files, however they could also be *.inc files to denote includes. We could also use *.inc.php or *.class.php files to denote includes and classes. We could also use our own file types to be included by *.php files. For example; index.php could be used to include a *.ourfile script.
These files are used to include script into another file; it can be useful when using many single pages to build a website. For example if we wanted to include a header file or a global site menu into many pages we could use an include file such as; menu.inc.php.
One of the tasks of the Php developer is to ensure that the script is well written and concise, one of the ways this can be done is to avoid and reduce repetition of code.
Classes are containers, which commonly have methods, they are used to create objects and are useful when performing many related actions or storing data relating to one item. To create a class we can either add the class script into the *.php file we are looking at directly or use a class include. An example class could be:
?>
These are containers for script, which can be used more than once, this is a good method to reduce repetition in code, if for example we find ourselves doing the same mathematical calculation over and over again, we can create a function and pass it arguments.
A function argument can be a string, integer, array, object, resource etc. Once passed into a function operation can be performed on these arguments to produce an action or output. A sample function is:
}
There are built in functions built into Php, these can be called from anywhere within the script, these functions can also be extended by installing additional Php extensions. If an unknown or an undefined function is called it will return a: “Fatal error: Call to undefined function” error.
An array is a good way to structure or organise data, Arrays have dimensions and the more dimensions an array has the more complex it becomes. It is closely related to Objects and can work in much the same way.
A Php array looks like this:
<?php
$MyArray[0][0][0] = “A”;
$MyArray[0][0][1] = “B”;
The above array will return: Array ( [0] => Array ( [0] => Array ( [0] => A [1] => B ) ) ), here we can see that the value of A and B is stored in the 3rd dimension of this array. Practical uses of arrays include storing database query results, storing configurations and paginating data.
The Php resource for Arrays can be found here

If you have a project, which has failed, stalled or been dropped.