Extracting variable values from nested arrays
Posted: Mon Oct 25, 2004 5:56 am
I need to extract the values from a nested array so that I can send an email each staff member that has a -ve number of points, currently only the array index number is send for $staffFK and nothing is sent for $total, I have tried several things none of which work, can anyone help?
//declare array existing negative points
$existingNegativePoints = array();
// check if they're new
foreach ($negList AS $staffFK => $total){
if ($existingNegativePoints[$staffFK] == ""){
array_push($existingNegativePoints, array($staffFK, $total));
mail($supportMail, "DTH - just found member with NEGATIVE POINTS!!", "StaffFK = " .$staffFK.", Points = ".$total);
}
}
Thank you
Tasha
//declare array existing negative points
$existingNegativePoints = array();
// check if they're new
foreach ($negList AS $staffFK => $total){
if ($existingNegativePoints[$staffFK] == ""){
array_push($existingNegativePoints, array($staffFK, $total));
mail($supportMail, "DTH - just found member with NEGATIVE POINTS!!", "StaffFK = " .$staffFK.", Points = ".$total);
}
}
Thank you
Tasha