The What
Syntax
There are two syntaxes available for the foreach
construct:
foreach ( array $array_variable as mixed $value ) { // do stuff }
foreach ( array $array_variable as string|integer $key => mixed $value ) { // do stuff }
Description
Show It in ActionBasic
Alternative SyntaxBasic
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
Go DeepPro
In this video series, you will go deeper into the instruction.