Why not return just an array?
function GetCashierDetail ($UserID){
$GetCashierID = "SELECT cashiers_CashierID,cashiers_Total,cashiers_Last_Total
FROM `cashiers`
WHERE `cashiers_CashierCloseDate` is null and `cashiers_Status`='0'
and `cashiers_Delete` = '0' and `cashiers_User` = '".$UserID."'";
$objQueryCashierID = mysql_query($GetCashierID) or die ("Error Query [".$strSQL."]");
$GetCashierIDResult = mysql_fetch_array($objQueryCashierID);
$BillsCashierID = $GetCashierIDResult['cashiers_CashierID'];
$CashierTotal=$GetCashierIDResult['cashiers_Total'];
$CashierLastTotal=$GetCashierIDResult['cashiers_Last_Total'];
$num=mysql_affected_rows();
// Return Data
return array('cashierId'=>$BillsCashierID ,
'CashierTotal'=>$CashierTotal ,
'CashierLastTotal'=>$CashierLastTotal );
}
$user = GetCashierDetail($id);
$ID = $user['cashierId'];
echo $ID;