I'm trying to get two values from a multidimensional array below. I decode the JSON and then I try to filter it, however, I don't get any values then. Can you help me to fix this bug?
I try to get the email value and product name. What I thought is to get it with implode
$string=implode(', ', array_column($obj, 'email'));
This is my array
{
  "key": "sendMail",
  "cartItems": [
    {
      "bezeichnung": "test",
      "productname": "IGLO 5",
      "producttype": "Kunststoffsysteme",
      "windowtype": "Quadratisch",
      "typeopen": "rechts_kipp_open_mitte",
      "windowlong": "1000",
      "windowwide": "500",
      "dichtungen": "schwarz",
      "dekorfarbe": "",
      "outColorIn": "Grau",
      "outColorOut": "Grau",
      "selectedGriffe": "Standardgriff",
      "selectedOrnament": "Keine Angaben",
      "selectedVerglasung": "Keine Angaben",
      "selectedKante": "keine",
      "selectedSprossentyp": "Keine Angaben",
      "selectedSprossenmuster": "Keine Angaben",
      "selectedSprossenfarbe": "Keine Angaben",
      "selectedRahmenLinks": "Keine Angaben",
      "selectedRahmenRechts": "Keine Angaben",
      "selectedRahmenOben": "Keine Angaben",
      "selectedRahmenUnten": "Keine Angaben"
    }
  ],
  "personalData": {
    "name": "Hans Muster",
    "email": "hans.muster@email.ch",
    "tel": "0790012345",
    "agb": true
  }
}
 
     
    