A loop allows a block of code to be executed repeatedly until a specific condition is met.
Types of Loops in PHP:
for – Runs a block of code a specific number of times
while – Runs a block of code as long as the condition is true
do-while – Runs the code at least once, then repeats while the condition is true
foreach – Used for iterating over arrays and objects