I have a function which I have to loop it a few times but I'm getting an error of Cannot redeclare function(), is it not possible to loop a function like this, or is it just a problem in my function,
Thanks for your help.
while($i=0){
function gbFunc1($elem){ return (string)$elem['companyCode'][0]; }
function gbFunc2($elem){ return (string)$elem['locationType'][0][0]->locationDescription->name; }
function gbFunc3($elem){ return (string)$elem['vehicleRentalPrefType'][0]; }
function gbFunc4($elem){ return (string)$elem['customerReferenceInfo'][0]->referenceQualifier; }
function gbFunc5($elem){ return (string)$elem['customerReferenceInfo'][0]->referenceNumber; }
function vFunc3($elem){ return (float)$elem['rateAmount'][0][1]->rateAmount; }
$new = Fx::GroupBy($results_array, array('func:gbFunc1', 'func:gbFunc2', 'func:gbFunc3', 'func:gbFunc4', 'func:gbFunc5'), array(null, null, null, null, 'func:vFunc3',));
}