title: Check if string contains no characters except numbers?
body: <p>I need to check if a string contains NO other characters except numbers (0,1,2,3,4,5,6,7,8,9). </p>
  
  <p>I'm expecting the user to input a time (12:00). I <code>explode()</code> the input to seperate the hours and minutes. I now need to make sure the time is an actual time value.</p>
  
  <pre><code>$time = explode(":",$time);
  
  if ($time['0'] &gt; 12 || $time['0'] &lt; 1 || not_actual_numbers)
  {
      //error: not valid hour
      echo("error: time val hour is bad");
  }
  </code></pre>