<?php
    use shop\Product;
    $product_meta = Product::product_meta($this->product_id);
?>

<?php if (is_array($product_meta) && count($product_meta)): ?>
    <? $lastKey = array_key_last($product_meta); ?>

    <div id="product-meta">
        Kategorie:
        <? foreach ($product_meta as $key => $value) : ?>
            <a href="/<?= $value['seo_link']; ?>"><?= $value['title']; ?></a><?= $lastKey != $key ? ', ': ''; ?>
        <? endforeach; ?>
    </div>
<?php endif; ?>