Answer & Solution
array()
construct. Therefore, the correct way to declare an array $colors
with values 'Red'
, 'Green'
, and 'Blue'
is $colors = array('Red', 'Green', 'Blue');
. The other options are incorrect syntax for declaring arrays in PHP.