What are common errors to watch out for when defining arrays in PHP for window size adjustments?

Common errors to watch out for when defining arrays in PHP for window size adjustments include using incorrect array syntax, not specifying the correct index for the array elements, and not properly accessing the array values when adjusting window sizes. To avoid these errors, make sure to use the correct array syntax, specify the correct index for the array elements, and properly access the array values when adjusting window sizes.

// Incorrect way of defining an array for window size adjustments
$windowSizes = array("small", "medium", "large");

// Correct way of defining an array for window size adjustments
$windowSizes = array(
    "small" => 480,
    "medium" => 768,
    "large" => 1024
);

// Accessing the array values for window size adjustments
$window = "small";
$windowWidth = $windowSizes[$window];
echo "Window width for $window size is: $windowWidth";