I have made the following 'foreach' which i need to make loop 10 times then stop. I cannot use a for command.
<?php
$x=array("Seb","Ginna","Shane","Guy","Jackie","Frances","John","Alec","Jon","Sam","Chris","Paula");
foreach ($x as $value)
{
echo $value . ",";
}
?>
Prvious to this i used:
<?php
$theNames = array('Seb', 'Ginna', 'Shane', 'Guy', 'Jackie', 'Frances', 'John', 'Alec', 'Jon', 'Sam', 'Chris', 'Paula');
$toOutput = implode(",", $theNames);
for ($i=0; $i < 10; $i++) {
print $toOutput."<br/>";
}
?>
The previous code works the way i want it to however i need it to work in a foreach loop