I formatted your code, moved the $ste variable above the last is_array, added the $ste addition inside the for loop (so it gets counted properly) and printed the value at the end.
This is untested as I don't really know what your doing, I just fixed what I noticed is wrong.
<?php
$new_array = array_combine($biltugas,$masatugas);
asort($new_array);
function kiramasatugas($masatugas){
if(is_array($masatugas)){
$count=0;
foreach($masatugas as $key=>$value){
if(is_numeric($value)){
$MSTG[$count] = $value;
} else {
$MSTG[$count] = 0;
}
$count++;
}
return $MSTG;
}
return false;
}
$ste = 0;
if(is_array($biltugas)){
foreach($biltugas as $key=>$value){
$kiramasatugas = kiramasatugas($_POST['masatugas']);
$s[] = $kiramasatugas[$key];
$jumlahmasatugas = array_sum($s);
$ste += $value;
}
print_r($new_array);
echo $ste;
}
?>
My advice to you over everything else ... format your code to get more help.