Re: var type

From: Date: Mon, 18 Dec 2000 19:22:51 +0000
Subject: Re: var type
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30889@lists.php.net to get a copy of this message
Hey Thomas- Read : http://www.php.net/manual/language.types.type-juggling.php Regards, Philip --.sig [ Want to write Good code? First, write Bad code. ] On Mon, 18 Dec 2000, Thomas Holton wrote: > > Hello, > I have strings that contain numbers... this is because it is easier to > insert chars into strings of numbers for prettier displays. However, now > that i want to compare these strings NUMERICALLY, i cannot. > IOW: > string1 = "2001"; > string2 = "2002"; > > if( string2 >= string1 ) { ... > > but this is never true, as it should be. How can i integerize these > strings for simple numerical comparison. > > thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#30889) next »