Reply to Re: Adding cart variables to an array

Your name:

Reply:


Posted by J2be on 09/29/59 11:37

> // display each order line - this part works
> // add each order line to an array - only gets the second (last) cart item
> $OrderLines = array($i => array("Item" => $$tempname,
> "Qty" => $$tempquantity,
> "Extended" => $$tempgross ));
> }

<?PHP
//declare the array at the top of your code
$OrderLines = array();

//........
//tell to which key you want to add the array as value
$OrderLines[$i] = array("Item" => $$tempname, "Qty" => $$tempquantity,
"Extended" => $$tempgross );

//you can also use array_push() function to have the same result.

?>
-------------------------------------------------


Cheers.



--
----
Leonardo Armando Iarrusso - J2Be
www: http://www.J2be.com - e-mail: info[at]J2Be.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация