burhan49 adlı üyeden alıntı: mesajı görüntüle
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [ <?php
$gid = 1;
foreach($sorular["data"] as $soru)
$gid++;
{
?>{
"@type": "Question",
"name": "soru...",
"acceptedAnswer": {
"@type": "Answer",
"text": "cevap..."
}
}
<? if ($gid <= $sorusayisi) { echo ",";} ?>
<?php
}
?>
]
}
</script>
Çok teşekkür ederim ufak düzeltme yaptım çalıştı. Benzer sorun yaşayanlar bunu uygulayabilir.

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