Ich versuche, einige Code aus einem Online-Tutorial zu verstehen, und stolperte über etwas, das ich nicht verstehe.
$productByCode = $db_handle->runQuery("SELECT * FROM tblproduct WHERE code='" . $_POST["code"] . "'");
$itemArray = array($productByCode[0]["code"]=>array('name'=>$productByCode[0]["name"],
'code'=>$productByCode[0]["code"],
'price'=>$productByCode[0]["price"]));
Was bedeutet die [0]
in array($productByCode[0]["code"]
das?
Google "php verschachtelte Arrays" –