Jump to content

[SOLVED] Alter For Loop


TheJoey

Recommended Posts

$sum = 0;
foreach($_SESSION['itemname'] as $k=>$v) {

$sum += $_SESSION['itemprice'][$k];
      echo "Item Name : ".$v . ': Item Price : ' . $_SESSION['itemprice'][$k] . ': QTY : ' . $_SESSION['itemqty'][$k] ."<br></br>";

  }

echo $sum;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.