<?php
$items = array(
array("name" => 1),
array("name" => 2),
array("name" => 3),
array("name" => 4),
array("name" => 5),
array("name" => 6),
array("name" => 7),
array("name" => 8)
);
for ($i = 0; $i < 3; $i++) {
?>
<li>0<?php echo $i + 1; ?><a href="#"><?php echo $items[$i]['name']; ?></a></li>
<?php
}
?>
Logo
<?php
for ($i = 3; $i < count($items); $i++) {
?>
<li>0<?php echo $i + 1; ?><a href="#"><?php echo $items[$i]['name']; ?></a></li>
<?php
}
?>
<?php
$items = array(
array("name" => 1),
array("name" => 2),
array("name" => 3),
array("name" => 4),
array("name" => 5),
array("name" => 6),
array("name" => 7),
array("name" => 8)
);
foreach (array_slice($items, 0, 1) as $item) {
echo sprintf("<div>%s</div>",$item["name"]);
}
echo "display logo";
foreach (array_slice($items, 1, 3) as $item) {
echo sprintf("<div>%s</div>",$item["name"]);
}
?>