RE: [PHP] Ok, I know this may sound like a stupid question...

From: Date: Tue, 05 Dec 2000 21:29:09 +0000
Subject: RE: [PHP] Ok, I know this may sound like a stupid question...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28762@lists.php.net to get a copy of this message
At the risk of bringing down flame-hellfire on my head, you could use a bubble sort. With so few variables to sort through, it should work great. Here's a JavaScript example: http://javascript.internet.com/calculators/bubble-sort.html -Jeff -----Original Message----- From: Boget, Chris [mailto:Chris.Boget@wild.net] Sent: Tuesday, December 05, 2000 3:12 PM To: PHP (E-mail) Subject: [PHP] Ok, I know this may sound like a stupid question... but I've been trying to find *simple* logic to do this and I cannot seem to wrap my head around it... I have 4 variables that are dynamically assigned numerical values. Let's say, after all the dynamic assignement is completed, I end up with: $this = 13; $that = 9; $other = 27; $bob = 2; What is the simplest way to figure out what order those variables should go in ascending order.... Without putting the above 4 variables in an array... I've got some code, but it's soooo long. Longer than it should be, I'm sure. Thanks for any help you can provide! Chris

« previous php.general (#28762) next »