);
To iterate items in a Cart you may do something like that:
foreach ($MyCart-getItems as $Item) {
echo($Item-getProductId(), $Item-getQuantity);
}
Allex
Steve Turner wrote:
I am just learning to use objects. I am messing around with a shopping cart
object, but am having confusing problems. I am
I'm just adding a working example to my last post; check the
implementation part at the end of the script;
Cheers, Allex
?php
class Item {
var $_productID;
var $_quantity;
function Item($productID, $quantity) {
$this-_productID = $productID
point of view, I still have some troubles with avoiding
the same error messages while editing my php staff, that means the
development environment which I use (Eclipse + some plugins) can't
handle the include/require directives correctly.
Perhaps you may face the same issue .. ??
Allex
Pablo
| |globals.php
|index.php
|
I'm running PHP 4.3.2 with Apache 2 on WinXP box.
Thanks,
Allex
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
4 matches
Mail list logo