Can anybody tell me how to take the elements in the $Remove array below and remove them from the $Total array?
If I substitute strings (i.e. apples,pears,beans,peas,etc.) for the array elements the code below works ok.
But if I use it strictly with numbers it won't work.
$Remove = array(4,6,9,135,172,190);
$Total = array(1,3,4,5,6,7,8,9,10,135,12,190,195);
//This looks like it will remove the values but it won't
//What it does is remove the array keys
for ($i = 0; $i < count($Remove); $i++){
$LineFromRemove = each($Remove);
$RemoveThis = $LineFromRemove[value];
unset($Total[$RemoveThis]);
}
for ($n = 0; $n < count($Total); $n++){
$LineFromTotal = each($Total);
echo "Key: $LineFromTotal[key] <b>Value: $LineFromTotal[value]</b><p>";
}
Thanks.