Here is my code:
$stack = array();
foreach ($quote->getAllItems() as $item) {
$PID = $item->getProduct()->getId();
$stack["productid"][] = $PID;
$QTY = $item->getQty();
$stack["productqty"][] = $QTY;
}
foreach($stack as $value){
$ProductId = $value["productid"];
$ProductQty = $value["productqty"];
echo "ProductId is: $ProductId - Product QTY is: $ProductQty <br>";
}
I receive two rows as the exact number of results is but $ProductId and $ProductQty seems to be blank.
Where is my mistake why i can not display the results by key?
Thanks in advance!
$stack