$prices = array( array("Product" => "Shampoo", "Price" => 10), array("Product" => "Soap", "Price" => 5), array("Product" => "Conditioner", "Price" => 15) ); $total = 0; foreach($prices as &$item) { $item["Total"] = $item["Price"] * 2; $total += $item["Total"]; } print_r($prices); echo "Total cost: $" . $total;In this example, we have an array of prices for different products. We use a loop to add a new column called "Total" to each item in the array, which is calculated by multiplying the price by 2. Finally, we calculate and display the total cost of all the items. The AssColumn function is part of the PHP Array Functions library.