The for loop The for loop is used to execute a set of statements for a certain number of times. Syntax: for (init; condition; increment/decrement) { code to be executed; } Components of for loop: init: set a counter variable…
Tag: php loops
PHP Tutorial – The while loop
A loop is a block of code that enables you to repeat the same set of statements or commands over and over again; the actual number of repetitions may be dependent on a number you specify. The while loop The…