Answers for "how to loop an html in php"

PHP
1

How to write a loop in PHP

<?php

//FOR each item within the array, "ECHO" out the index ($i) and value of each item.
$numbersArray = [1, 2, 3]
for($i = 0; $i < count($numbersArray); $i++) {
	echo "Index of ".$i."= ".$numbersArray[$i]."<br>";
}

?>
Posted by: Guest on March-16-2022

Code answers related to "how to loop an html in php"

Browse Popular Code Answers by Language