I have a set of variables that have randomly assigned values.
E.g.,
$a = 1;
$b = -1;
$c = 2;
And I have a script that corresponds to each variable.
E.g.,
a.php for $a
b.php for $b
c.php for $c
I want to run the script that corresponds with the variable that has the greatest value. So, in this case, I want to run c.php because $c has the greatest value among the three variables.
Thank you so much, Peter
Edit: This is what I have. I've basically put the variables in an array and sorted them from highest to lowest according to the value. But this doesn't solve my problem. I want to run a corresponding php file.
$var = array( 'a' => $a, 'b' => $b, 'c' => $c);
arsort($var);