On Thursday 14 October 2004 06:19, BOOT wrote: [snip] > I have been able to do this by means of if comparisons but the more I > variables I add then the more complicated and messy it becomes. There has > to be a simpler way. If it makes any difference, the variables could just > as easily be array elements. So stick them into an array and use one of the many array functions. > the code should determine that $a and $b have the lowest value, and > randomly pick one of them. if $a was = 1 instead then it would just pick $a The "randomly pick one" part you would have to code yourself. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* It's amazing how much better you feel once you've given up hope. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php