I have an array and I don’t know how to change it to the structure I need: My array:
array (
"1536" => "12",
"1695" => "Korea",
"1904" => "10/7",
"1905" => "",
"1906" => null,
"1907" => "1.1",
"1906.1" => "H1",
"1906.2" => "H35",
"1905.1" => "15"
)
I need to cast this array to this form (remove the tenths of the numbers, and paste the values of the same numbers into the array):
array (
"1536" => "12",
"1695" => "Korea",
"1904" => "10/7",
"1905" => array("", "15"),
"1906" => array(null, "H1", "H35"),
"1907" => "1.1"
)
foreachwith index parsing...