Can someone explain this code snippet please?
| From: | Boa Constructor | Date: | Mon, 19 May 2003 19:59:04 +0000 |
| Subject: | Can someone explain this code snippet please? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27896@lists.php.net to get a copy of this message | ||
Hey all, would someone be able to explain the following code to me? I've
never used a foreach loop and I've never seen the "$$" before a variable.
foreach ($cart as $isbn => $qty)
{
if($$isbn=="0")
unset($cart[$isbn]);
else
$cart[$isbn] = $$isbn;
}
Cheers,
Graeme :)