- var_dump: documentation ( source)
<?php
$data = array(array("Price" => 66), array("Price" => 99));
function extractPrice($guestPrices, $priceType)
{
$modifier = 10;
$newArray = array();
foreach($guestPrices as $guestPrice){
$newArray[] = $guestPrice[$priceType]*$modifier;
}
return $newArray;
}
var_dump(extractPrice($data, 'Price'));