Note that the tutorials are displayed in order of difficulty! (From beginner to experienced.)

PHP Tutorial – For Loops

The “for loop” execute a block of code a specified number of times while a specified condition is true.

Syntax


for (init; condition; increment)
{
    code to be executed;
}

More »


Posted in PHP Tutorials | 3 Comments


PHP Tutorial – foreach Loop

The “foreach” loop gives PHP an easy way to iterate over arrays and can only be used on arrays.

Syntax

There are two syntaxes although the second is only a minor extension of the first. More »


Posted in PHP Tutorials | 2 Comments


PHP Tutorial – Functions

The power of the PHP language is the large number of built-in functions (more than 700 built-in function and counting lipitor weight gain.) But of course it also possible to create your own functions. In this PHP tutorial we will create our own functions.

A function will only be executed if a function is called by another piece of code. You can see that this is very handy. For example you can keep the browser from executing a script when the page loads by putting your script into a function. Only when the function is called (for example by pushing a button) the function is executed. More »


Posted in PHP Tutorials | Comments Off on PHP Tutorial – Functions


PHP Tutorial – Functions Parameters and Return Values

In a previous tutorial we looked at how to make your own PHP functions. In this PHP tutorial we will see how to use function parameters (for example passing a variable to a function) and function return values.

Functions Parameters

Parameters are specified after the function name, inside the parentheses. More »


Posted in PHP Tutorials | 3 Comments


PHP Tutorial – Form Handling

In this PHP language tutorial we will look at PHP forms and form handling. We will use the PHP $_GET and $_POST variables to retrieve information from the HTML form. You use forms to get user input. More »


Posted in PHP Tutorials | 1 Comment


PHP Tutorial – $_GET Function

The PHP built-in $_GET function is used to collect values in a form (as name says, you do this with the method=”get”) You should remember that the information sent from a form with the GET method is visible to everyone, because the result is displayed in the address bar.

The $_GET function limits the number of characters to be send (max. 100 characters.) More »


Posted in PHP Tutorials | 1 Comment


PHP Tutorial – $_POST Function

The PHP built-in $_POST function is used to collect values in a form (as name says, you do this with the method=”post”) The information send with POST method is invisible to others (the opposite of the GET method.)

Another difference between the $_GET function and the $_POST function is that the $_POST function doesn’t limit the amount of information that you want to send. (Limit of $_GET is 100 characters.) But you should be aware of the following: by default there is an 8Mb maximum size for the post method. (If you want a larger size you can change it in the php.ini file. The setting is called post_max_size.) More »


Posted in PHP Tutorials | 5 Comments


PHP Tutorial – $_REQUEST Function

In previous tutorials we already looked at the PHP built-in $_GET function and $_POST function. In this tutorial we take a quick look at the PHP built-in $_REQUEST function.

The PHP built-in $_REQUEST function can be used with both the GET and POST methods. More »


Posted in PHP Tutorials | 5 Comments


PHP Tutorial – include and require

In this PHP language tutorial we will take a look at server side includes (SSI). We will look at include(), require() and require_once() functions. These functions can be used to insert content of one PHP file into another PHP file (on the server side) before the server will execute the file. More »


Posted in PHP Tutorials | 1 Comment


PHP Tutorial – File Handling

In this PHP web-programming language we will take a look at file handling. We will take a look at how to open en close a file, how to read a file line by line and how to read a file character by character. More »


Posted in PHP Tutorials | 6 Comments