Maybe a trivial Problem - but im stuck. I have an Array, printed out with print_r
Array ( [Code] => 200 [Content] => Array ( [0] => Array ( [BelegID] => XXXX [BelegDatum] => 1453330800 [Lager] => ABCLAGER [Transporteur] => 0 ) ) )
When i try to access the Array via
if($auftrag['Code'] == "200"){DO SOMETHING}
I get the error
Warning: Illegal string offset 'Code' in
Can someone enlight me please?
Cheers
$auftragmust be a string and not an array.ifloop, pasting$auftragfrom theif. I think a typo or a different scope variable. (Edit: no different scope. It's a string).$auftrag.