Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Loop through and print all the values of an indexed array:
SUBMITTED BY:
henry1874w
DATE:
June 22, 2017, 12:01 a.m.
FORMAT:
Text only
SIZE:
150 Bytes
Raw
Download
Tweet
HITS:
262
Go to comments
Report
<?php
$cars=array("Volvo","BMW","Toyota");
$arrlength=count($cars);
for($x=0;$x<$arrlength;$x++)
{
echo $cars[$x];
echo "<br>";
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus