Help with a Function
Posted: Wed Oct 13, 2004 7:15 am
twigletmac | Help us, help you. Please use
Could someone explain the reason why the function above begind with a & and also why $_SESSION[cart][$key] also begins with a &
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]Code: Select all
function &getProduct($name) {
foreach ($_SESSION['cart'] as $key => $product) {
if ($product[0] == $name) {
return &$_SESSION['cart'][$key];
}
}
return FALSE;
}