title: How can I get the second json block of a JSON output?
body: <p>This method </p>
  
  <pre><code>$bestandspflegeArray = json_decode($urlContents, true);
  </code></pre>
  
  <p>turns json into an array.</p>
  
  <p>With this method</p>
  
  <pre><code>$hersteller = array_column($bestandspflegeArray, 'hersteller');
  </code></pre>
  
  <p>I get all values of "hersteller".</p>
  
  <p>So how can I say if the html input matches with the value of hersteller, print all his other values too. Like id, hersteller and baujahr...and so on? In the json code down below for "bmw" for example.</p>
  
  <pre><code>[
  {
  "id": 2,
  "hersteller": "bmw",
  "modell": "{modell}",
  "baujahr": "2015",
  "artikelname": "nockenwelle",
  "ekpreis": 149,
  "verkpreis": 349,
  "mengeverfuegbar": 8
  },
  {
  "id": 3,
  "hersteller": "audi",
  "modell": "{modell}",
  "baujahr": "2018",
  "artikelname": "kotfluegel",
  "ekpreis": 89,
  "verkpreis": 249,
  "mengeverfuegbar": 4
  },
  {
  "id": 4,
  "hersteller": "mercedes",
  "modell": "{modell}",
  "baujahr": "2019",
  "artikelname": "getriebe",
  "ekpreis": 299,
  "verkpreis": 859,
  "mengeverfuegbar": 3
  }
  ]
  </code></pre>
  
  <p>Thank you :)</p>