View Single Post
  #36 (permalink)  
Old 08-17-2007, 08:57 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Website Performance - Tips & Tricks

How to check if a variable is an integer?

Tip: Assuming $foo is an the variable do :

if (ereg("^[0-9]+$", $foo)) {
echo "it's an Integer";
}
__________________

J.Vijayanand
Reply With Quote