function __check_istrue($obj, $b) { if ($obj) { $result = array('status' => 'success', 'back' => $b); echo json_encode($result); exit; } else { $result = array('status' => 'error'); echo json_encode($result); exit; } }