2
Is this for PHP, or for Smarty (templates)?
For PHP, you can use a flag:
$first_iteration = true;
foreach ($array) {
if ($first_iteration) {
...
$first_iteration = false;
}
...
}
You could use the same approach in Smarty, but Smarty also has an
iteration property that can be tested within the loop, so you don't need to define a separate flag.