 <p>There are two ways to cast a variable in PHP as a specific type.</p> <ol> <li>using the settype() function</li> <li>using (int) (bool) (float) etc</li> </ol> <p>More Info : <a href="http://www.electrictoolbox.com/type-casting-php/" rel="nofollow">http://www.electrictoolbox.com/type-casting-php/</a></p>