What is the difference between accessing a value in an array using $array['wert1'] and $array[wert1] in PHP?

When accessing a value in an array using $array['wert1'], you are specifying the key as a string. On the other hand, when using $array[wert1] without quotes, PHP will treat wert1 as a constant. If wert1 is not defined as a constant, PHP will issue a notice and treat it as a string. To avoid this notice and ensure correct array access, always use quotes around the key when accessing array values.

// Using $array['wert1'] to access the value in the array
$value = $array['wert1'];