Perhaps this is impossible, I never saw him myself, but thought that I would ask. If this is my array,
$myarr = array(
'red' => 7,
'green' => 7,
'blue' => 18,
'cyan' => 14,
'pink' => 18
'brown' => 18
);
Is there a way to initialize an array to set the same values right away? as
'red' && 'green' =>7,
'blue' && 'pink' && 'brown' => 18,
'cyan' =>14
Of course, I do not expect this syntax to work, but is there anything that gives me the same idea?
source
share