I have an associative array and inside that array each item has an array.
I want to sort the array by the number in the array for each item, how would I go about doing this?
Here is the array, and to clarify, it should be sorted so that it reads like this: C, A, D, B.
$array = array(
"A" => array(
"word" => "Apple",
"number" => 945
),
"B" => array(
"word" => "Banana",
"number" => 5698
),
"C" => array(
"word" => "Cherry",
"number" => 12
),
"D" => array(
"word" => "Date",
"number" => 1034
)
);