title: Whole number or decimal number
body: <p>I'm looking for a function that tests to see if an integer is a whole number. 
  So far I've got this:</p>
  
  <pre><code>if (is_numeric($answer3)) {
      echo "Is triangular\n";
  } else {
      echo "Is not triangular\n";
  }
  </code></pre>
  
  <p>But this always returns "Is triangular", even when $answer3 is a decimal.</p>
  
  <p>How can I test an integer to see if it has a decimal?</p>