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

From: Date: Fri, 17 Aug 2007 16:27:50 +0000
Subject: RE: [PHP] cant get if logic correct..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-260968@lists.php.net to get a copy of this message
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 web hosting plan -----Original Message----- From: Gregory Machin [mailto:gregory.machin@gmail.com] Sent: Wednesday, August 15, 2007 7:01 PM To: php-general@lists.php.net Subject: [PHP] cant get if logic correct.. 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

« previous php.general (#260968) next »