WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Check int / integer - checking if a variable is an integer or not. The php is_int() function does not check if the string value is integer or not.
Categories : PHP, Variables Update Picture
Yared g
Date : Oct 12th 2000
Grade : 3 of 5 (graded 6 times)
Viewed : 26119
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Yared g
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

function check_int($i) {

// return 0 if not int and return 1 if $i is int

if (ereg("^[0-9]+[.]?[0-9]*$", $i, $p)) {
return 1;
} else {
return 0;
}// end if

}// end check_int



Passing variables by reference.
Categories : Variables, PHP
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
Categories : PHP, Arrays, Variables
Initialize global variables for every field in a table. This version requires that phplib is installed on your server.
Categories : Global Variables, MySQL, PHP, Variables
A class to put get and post variables in hidden form elements. Works on scalars, normal arrays, associative arrays.
Categories : Algorithms, Variables, Arrays, PHP, PHP Classes
How to display a PHP variable value from a selectbox without reloading the page by merging PHP and Javascript variables.
Categories : PHP, Java Script, Variables
How to pass an array to a function, or how to define a function wich recieves an array.
Categories : Variables, PHP, Arrays
Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
Categories : PHP, Directories, Variables, Arrays
Working with files - return an array of files within a directory
Categories : PHP, Strings, Variables, Filesystem
Working with files - putting file contents to a string / var
Categories : PHP, Filesystem, Variables, Strings
How to make sure a that $foo is from a cookie and not from the URI.
Categories : PHP, Variables, Global Variables, Cookies
Inline Scope Control - The inline class provides methods for creating and destroying local variable scopes. Simply put, local scopes are spaces where some or all of the global variables are temporarily hidden.
Categories : PHP, PHP Classes, Variables
A simple function to prevent undefined $_POST/$_GET/$_SESSION variable errors
Categories : PHP, Variables, Errors and Logging
Accessing GET and PUT variables with HTTP_GET_VARS on Win2K.
Categories : PHP, Windows 2000, Variables
Make your PHP 4.1 (or higher) script compatible with PHP 4.0 (still used by some prviders)
Categories : PHP, PHP Options and Info, Variables
 Shashank Tripathi wrote :1699
Just use the is_numeric() function. The function that the other poster has suggested is highly inefficient. The POSIX "eregi" library functions are much poorer performers than their "preg_" equivalents, but for your purpose you don`t need any regex at all.