Loop Statement – foreach
The foreach loop is mostly used to parse through an array that for every loop, the value of the current array content/value is assigned to the $value (after which the array pointer increments by a factor of one) then the next loop results in the next array content/value. Syntax: foreach (array as value) { code [...]
Filed under: Basic Programming, Sample Code by Celine
No Comments »