If you wish $shoplist[$pid] have $price in it with $units, you have to make
$shoplist a multidimensional array which is simpple:
<?
$shoplist = array();
$shoplist[$pid][$units] = "1";
$shoplist[$pid][$price] = "100";
print_r($shoplist);
?>
Try that out, it should give you the idea. You can make it even more
multidimensional if you need to.
Niklas
-----Original Message-----
From: Kristofer Thorssell [mailto:[EMAIL PROTECTED]]
Sent: 7. syyskuuta 2001 12:55
To: Php-General (E-mail)
Subject: [PHP] extending array
Hi,
I want to extend an existing array.
the array is
$shoplist[$pid] = $units;
and i want to have $ price in it too.
How do I do?
/Kristofer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]