In the C tutorial “How to use Time and Date in C” some people asked questions in the comment section about determining dates and day of the week. That’s why we created this tutorial to show you what things you have to lookout for, such as leap years. More »
Posted in C Tutorials |
The power of the PHP language is the large number of built-in functions (more than 700 built-in function and counting.) 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 |
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 |
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 |
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 |
The do…while statement will always execute the block of code once. After this first execute it will check the condition, and repeat the loop (keep executing) while the condition is true. More »
Posted in PHP Tutorials |
The PHP language has four different kinds of conditioned loops. In this PHP tutorial we will look at the “while” loop. Loops are used to execute a block of code multiple times.
In PHP, we have the following loop statements: More »
Posted in PHP Tutorials |
In this PHP language tutorial we will take a look at arrays in PHP. A normal variable holds only one value. An array is different. An array lets you declare and work with a collection of values.
If you would use normal variables to store for instance a list of names it would look something like this: More »
Posted in PHP Tutorials |
In this PHP programming tutorial we will take a look at the “if else statement” (the PHP “switch statement“ can be found here.) Conditional statements (such as “if else” or “switch”) are used to alter the flow of a program if a specific test condition is true. More »
Posted in PHP Tutorials |
Just as the PHP language “if…else” statement, you can use the “switch” statement to alter the flow of a program. In other words; conditional statements are used to perform actions on different conditions. The switch statement is used to select one of many blocks of code to be executed. More »
Posted in PHP Tutorials |