Posts Tagged ‘foreach loop’

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 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...