- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
- Parse error: syntax error, unexpected ';' in /in/iSSpq on line 13
Process exited with code 255.
<?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');