var type

From: Date: Mon, 18 Dec 2000 19:21:39 +0000
Subject: var type
Groups: php.general 
Request: Send a blank email to php-general+get-30887@lists.php.net to get a copy of this message
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

« previous php.general (#30887) next »