Posts Tagged ‘PHP’

PHP Foreach Loop

This item was filled under [ PHP & MySql, References ]

A total different kind of loop is the foreach loop. This loop is used to separately handle each sub-variable out of an array. Each sub-variable may be split into its name and its value. foreach($array AS $key => $value) { … execute code … } Each sub-variable of the array $array will be split into [...]

Continue reading...

Tagged with: [ , , , ]

PHP For Loop

This item was filled under [ PHP & MySql, References ]

The For loop is used to repeat executing a certain code for a specific amount of times. This could as well be done with the while loop however the for loop is made for this. The while loop may be used for much more complex stuff and for various other purposes. The for loop is [...]

Continue reading...

Tagged with: [ , , , ]

PHP If Loop

This item was filled under [ PHP & MySql, References ]

The If Loop is a very basic loop and used often. It’s used to check a condition and execute a code based on whether the condition was true or not. if( … condition … ) { … execute code … }else{ … execute other code … } The condition is put between brackets and the [...]

Continue reading...

Tagged with: [ , , ]

PHP Loops

This item was filled under [ PHP & MySql, References ]

In PHP loops are used to execute codes under certain conditions and may also be used to repeat the code. There are different loops to do different kind of things: If loop The If loop is used to execute a certain code only when a certain condition is true. While loop The While loop is [...]

Continue reading...

PHP Variables

This item was filled under [ PHP & MySql, References ]

Like most other programming languages, PHP as well uses variables. Variables are meant to store data ( for example an integer or a string ) into. You can give them a name and a value. Once you call them anywhere in your script, the value that’s stored inside the variable is automaticly used. In PHP [...]

Continue reading...

Tagged with: [ , ]