Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Loop through an indexed array
SUBMITTED BY:
henry1874w
DATE:
June 17, 2017, 1:07 p.m.
FORMAT:
Text only
SIZE:
216 Bytes
Raw
Download
Tweet
HITS:
229
Go to comments
Report
<!DOCTYPE html>
<html>
<body>
<?php
$cars = array("Volvo", "BMW", "Toyota");
$arrlength = count($cars);
for($x = 0; $x < $arrlength; $x++) {
echo $cars[$x];
echo "<br>";
}
?>
</body>
</html>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus