Checking if a string is a double or not
<p>I am trying to check in php if a string is a double or not.</p>

<p>Here is my code:</p>

<pre><code>   if(floatval($num)){
         $this-&gt;print_half_star();
    }
</code></pre>

<p>$num is a string..The problem is that even when there is an int it gives true. Is there a way to check if it is a float and not an int!?</p>
