/**
*
* @Check if number is odd or even
*
* @var $num The number to check
*
* Return BOOL
*
*/
function checkNum($num){
  return ($num%2) ? TRUE : FALSE;
}

if(checkNum($num) === TRUE){
  echo 'its odd';
}else{
  echo 'its even';
}