This would be more readable if it used (otoh) $smarty.foreach.PUT_FOREACH_NAME_HERE.first to check whether we're on the first iteration.