is_integer probably wouldn't work, since you're dealing with strings here.
Your best friend here would probably be 'is_numeric' which would return true
on both the string '1' as the integer 1 true. As well as 1.1 and '1.1'. The
only one solution I could think if would be:
preg_match('/^\d+$/',
Why don't you try to check for if it is integer. You will get the function
to check the variable (is_integer not sure) in manual.
Warm Regards,
Sanjeev
http://www.sanchanworld.com
http://webdirectory.sanchanworld.com - Submit your website URL
http://webhosting.sanchanworld.com - Choose your best
Gregory Machin wrote:
Hi
i have a piece of code that gets info from a comma delimited file,
then gets each value that is to be insterted into the database
The variabls must only contain numbers and must not be null ..
but the logic i have is iether not working or there are some hidden
char
This will be of help.
http://us2.php.net/manual/en/function.is-numeric.php
On 8/15/07, Gregory Machin <[EMAIL PROTECTED]> wrote:
> Hi
> i have a piece of code that gets info from a comma delimited file,
> then gets each value that is to be insterted into the database
>
> The variabls must on
4 matches
Mail list logo