Loop it up: Unleash the power of for loops! I use for loops way more than I use while loops. It seems like most of the time I’m reading items from a database: for loops are perfect for that. I tend to use while loops in Java programs where I need to execute some code until the program terminates; that’s not realistic in PHP. In web-programming, I almost exclusively use for and foreach loops. In most programming languages, the for loop follows the following syntax: for (exp_before; exp_before_loop_body; exp_after) { loop_body } Once PHP encounters the for loop, it looks at the expression exp_before to initialize the necessary variables that are required by the loop. When