Learn PHP For Loop
PHP For Loop is used to execute the code up to specific number.
If you already know the last value then use it otherwise use while Loop.
Lets do practice with an example
In above example the code will execute until the value is 5 ( $i = 5 ;)
See this so easy right ?
Don't say no . hehe
Lets do another example with nested :
In PHP , you can use for loop inside for loop . We call this nested loop .
Outer Loop Execute 4 Times .
Inside loop execute 4 times inside outer loop . Outer loop execute 4 times and inner execute 4 times inside outerloop = 4 x 4 =16
Thats it . :)
Like use on top right :)