$cars = array(
array('name' => 'Toyota', price => 10000, ...),
array('name' => 'Ford', price => 20000, ...),
...
);
foreach($cars as &$car)
{
do_something($car['name']);
}
unset($car);
function do_something($name)
{
....
}
在 do_something() 函数中,$name 是引用还是值?如果它是一个引用,我如何在循环中检索值并将其传递给函数?