Hi,
I am trying to write an IF statement that may occur under several different scenarios. I tried to write an array in which each IF statement would occur, but I am not having any luck.
Here is the code I have so far:
Essentially, if $statistic_id equals any of the values in my array, then I want the script to perform asort instead of arsort.
Any guidance would be highly appreciated!
I am trying to write an IF statement that may occur under several different scenarios. I tried to write an array in which each IF statement would occur, but I am not having any luck.
Here is the code I have so far:
Code:
arsort ( $array ); $low_to_high = array( "1" => "22", "2" => "23", "3" => "24", "4" => "26", "5" => "27", "6" => "47", "7" => "49", "8" => "50", "9" => "51", "10" => "59", "11" => "61", "12" => "40" ); if ( $statistic_id = in_array(array_values($low_to_high), $low_to_high)) asort ( $array );
Any guidance would be highly appreciated!
Comment