如何从此JSON中检索数据

时间:2014-07-11 14:57:39

标签: php json

{
  "results": {
    "collection1": [
      {
        "property1": {
          "text": "HELLO! Online: celebrity & royal news, magazine, babies ...",
          "href": "http://www.hellomagazine.com/"
        },
        "property2": "www.hellomagazine.com/",
        "property3": "HELLO! Online brings you the latest celebrity & royal news from the UK & around the world, magazine exclusives, celeb babies, weddings, pregnancies and ..."
      },
      {
        "property1": {
          "text": "Avrupa'nın En Büyük Bebek Mağazası Hellobaby hellobaby ...",
          "href": "http://www.hellobaby.com.tr/"
        },
        "property2": "www.hellobaby.com.tr/",
        "property3": "Sipariş Takibi; Hello Baby Mobil; Sipariş ve Teslimat Şartları · Garanti Şartları · Banka Hesap Bilgilerimiz · İletişim · Havale Bildirim Formu · Öneri ve Şikayetler."
      },
      {
        "property1": {
          "text": "Lionel Richie - Hello - YouTube",
          "href": "http://www.youtube.com/watch?v=PDZcqBgCS74"
        },
        "property2": "www.youtube.com/watch?v=PDZcqBgCS74",
        "property3": "\"Hello\" is a song by Lionel Richie. Taken as the third single from Richie's multi-platinum album Can't Slow ..."
      },
      {
        "property1": {
          "text": "Karmin - Hello (Official Video) - YouTube",
          "href": "http://www.youtube.com/watch?v=0_I0DBUA_GI"
        },
        "property2": "www.youtube.com/watch?v=0_I0DBUA_GI",
        "property3": "Karminites Click To Subscribe! - http://bit.ly/1gHrCTb https://www.facebook.com/karminbook http://karminmusic ..."
      },
      {
        "property1": {
          "text": "Evernote Hello | Evernote",
          "href": "https://evernote.com/intl/tr/hello/"
        },
        "property2": "https://evernote.com/intl/tr/hello/",
        "property3": "İnsanları hatırlamak zordur. Evernote Hello zengin, göz atılabilir kişi, karşılaşma ve ortak deneyim geçmişi ile bunu kolaylaştırır."
      },
      {
        "property1": {
          "text": "Avril Lavigne - Hello Kitty | İzlesene.com Video",
          "href": "http://www.izlesene.com/video/avril-lavigne-hello-kitty/7357385"
        },
        "property2": "www.izlesene.com/video/avril-lavigne-hello.../735738...",
        "property3": "Tüm şarkılarını Avril Lavigne'in yazdığı \"Avril Lavigne\" albümünden Hello Kitty şarkısında eşi Chad Kroeger'in ..."
      },
      {
        "property1": {
          "text": "Hello on Vimeo",
          "href": "http://vimeo.com/35055590"
        },
        "property2": "vimeo.com/35055590",
        "property3": "Made by Matthijs Vlot. www.mattatjeoorlog.nl www.facebook.com/ant1mat3rie www.twitter.com/yomattie ..."
      },
      {
        "property1": {
          "text": "Hello (Lionel Richie song) - Wikipedia, the free encyclopedia",
          "href": "http://en.wikipedia.org/wiki/Hello_(Lionel_Richie_song)"
        },
        "property2": "en.wikipedia.org/.../Hello_(Lionel_Richie_son...",
        "property3": "\"Hello\" is a song by Lionel Richie. Taken as the third single from Richie's multi-platinum album Can't Slow Down, the song was released in 1984 and reached ..."
      },
      {
        "property1": {
          "text": "Hello",
          "href": "http://www.hellodesign.com/"
        },
        "property2": "www.hellodesign.com/",
        "property3": "Hello is an interactive design agency. We create intelligent, living systems for people to experience. We believe in building systems that are useful, usable, and ..."
      },
      {
        "property1": {
          "text": "Hello",
          "href": "http://www.hello.com/"
        },
        "property2": "www.hello.com/",
        "property3": "Join a one-of-a-kind community of users who celebrate friendship, imagination, self-expression, and authentic engagement in a safe environment. Engage in ..."
      }
    ]
  }
}

我在PHP中尝试了许多foreach,但由于嵌套循环,它非常慢。有没有办法以较少的循环获取所有数据?如何?我想得到所有的property1的文本,href和property2以及property3

0 个答案:

没有答案
相关问题