i want to get the lowest value of an array()
. Now I have 2 problems:
Problem 1: I can't define a 2D Array and get a illegal offset error.
Problem 2: When i found the lowest value I need to know who it is.
Example: Monday has a value of 5 and Tuesday has a value of 8. Now
I need to know if Monday or Tuesday has the lowest value and then I need the weekday of that value.
Here is my code:
$x = array(
["Monday"] => array($_REQUEST["Monday"]),
["Tuesday"] => array($_REQUEST["Tuesday"]),
["Wednesday"] => array($_REQUEST["Wednesday"]),
["Thursday"] => array($_REQUEST["Thursday"]),
["Friday"] => array($_REQUEST["Friday"]),
["Saturday"] => array($_REQUEST["Saturday"]),
["Sunday"] => array($_REQUEST["Sunday"])
);