How do I calculate the total of a shopping cart?
You can use array_merge() to merge two arrays into one.

It looks like you're trying to overengineer things. This is a simple solution:

$combined = array();
for ($i = 0; $i &lt; count($jcartItemQty); $i++) {
  $combined[] = array($jcartItemQty[$i], $jcartItemPrice[$i]);
}