Re: cant get if logic correct..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will be of help.

http://us2.php.net/manual/en/function.is-numeric.php

On 8/15/07, Gregory Machin <gregory.machin@xxxxxxxxx> 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
> characters creeping in because it is processing the data ... how can i
> do this better ?
>
>
> for($i=2;$i<$arrsize;$i++){
>                   $parts=explode(",",$lines[$i]);
>                                   $stnr=$parts[0];
>                   $subj=$parts[1];
>                   $mark=$parts[4];
>                 if (($stnr>"") and ($subj>"") and ($mark>"")){
>                                    //do alot of something lol
>                                    }
>                                }
>
> --
> Gregory Machin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux