Re: [PHP] cant get if logic correct..

2007-08-17 Thread Wouter van Vliet / Interpotential
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+$/',

RE: [PHP] cant get if logic correct..

2007-08-17 Thread Sanjeev N
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

Re: [PHP] cant get if logic correct..

2007-08-15 Thread Jim Lucas
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

Re: [PHP] cant get if logic correct..

2007-08-15 Thread Michael Preslar
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