• 15-06-2021, 20:27:27
    #1
    Merhaba arkadaşlar div içerisinde bulunan verileri alıyorum fakat sayfada bulunan schema içerisinden lowPrice almak istiyorum bunun için ne yapabilirim?

    <script type="application/ld+json">
    {
    "@context": "https://schema.org",
    "@type": "Product",
    "lowPrice": "50",

    </script>

    Yukarıda bulunan lowprice de almak istiyorum.

    <div class="xxx">(.*?)<a href="(.*?)" title="(.*?)" class="xxx" data-id="(.*?)">(.*?)</div>
  • 15-06-2021, 21:00:34
    #2
    Tam tersini niye yapmıyorsun
      $context  =  array(
        "@context" => "https://schema.org",
        "@type" => "Product",
        "lowPrice" => "50",
      );
      $scheme = "<script type='application/ld+json'>\n";
      $scheme .= json_encode($context);
      $scheme .= "</script>\n";
      echo $context['lowPrice'];
      echo $scheme
  • 15-06-2021, 22:12:04
    #3
    Kablesw adlı üyeden alıntı: mesajı görüntüle
    Tam tersini niye yapmıyorsun
      $context  =  array(
        "@context" => "https://schema.org",
        "@type" => "Product",
        "lowPrice" => "50",
      );
      $scheme = "<script type='application/ld+json'>\n";
      $scheme .= json_encode($context);
      $scheme .= "</script>\n";
      echo $context['lowPrice'];
      echo $scheme
    Teşekkürler hocam