What Is Looping, How to declare it , which one do you like most


  • 3 Comments
  • 101 Views
  • Share:

3 Comment

image
dev sahar 3 months ago

<?php // A simple PHP for loop example // Initialize the loop for ($i = 1; $i <= 10; $i++) { // Print the current value of $i echo "Number: $i<br>"; } ?>

image
3 months ago

Looping is the concept of repeating a block of code repeatedly until a certain condition is met, it also repeats a block of code for each items in an array.

image
Ogunbona Olayinka 3 months ago

looping is a process of repeating a section of code. it allows us to execute a block of code repeatedly. The for loop is my favorite. To declare a For loop, you will declare a variable, followed by your for loop function.