I'm having an Undefined offset
-Error in this PHP-Code
:
$testvar1 = false;
$testvar2 = true;
$testarray = [
"test1" => $testvar1,
"test2" => $testvar2
];
echo $testarray[0];
Notice: Undefined offset: 0 in /Path/to/ on line 9
So how to fix?