How do I pass an array through a function, for example:
$data = array(
'color' => 'red',
'height' => 'tall'
);
something($data);
function something($data) {
if ($data['color'] == 'red') {
// do something
}
}
how can I get the function to recognize $data[color]
and $data[height]
?