Merhaba, FAQ Scheme yapmaya çalıştım döngüyü kurdum. Ancak Döngü sonunda virgül kalması nedeniyle hata alıyorum. Nasıl çözebilirim? Ücretli destek verecekler özelden yazabilir.

Teşekkürler

  <script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [ <?php
        foreach($sorular["data"] as $soru)
        {
        ?>{
    "@type": "Question",
    "name": "soru...",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "cevap..."
    }
  },
                    <?php
        }
        ?>
  ]
}
</script>
Olması gereken

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{
    "@type": "Question",
    "name": "soru",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "cevap"
    }
  },{
    "@type": "Question",
    "name": "soru2",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "cevap2"
    }
  }]
}
</script>