First array:
Array (
[0] => Array ( [id] => 1 [occ] => 14 )
[1] => Array ( [id] => 2 [occ] => 12 )
[2] => Array ( [id] => 4 [occ] => 2 )
)
Second array:
Array (
[0] => Array ( [id] => 1 [company_name] => Google [CEO] => Mike )
[1] => Array ( [id] => 2 [company_name] => Apple [CEO] => Jones)
[2] => Array ( [id] => 2 [company_name] => Bmw [CEO] => Steve)
[3] => Array ( [id] => 3 [company_name] => Hardsoft [CEO] => Lucy )
[4] => Array ( [id] => 4 [company_name] => Lays [CEO] => Morty)
)
I Would like to merge these arrays to something like that:
Array (
[0] => Array ( [id] => 1 [company_name] => Google [CEO] => Mike [occ] => 14)
[1] => Array ( [id] => 2 [company_name] => Apple [CEO] => Jones [occ] => 12)
[2] => Array ( [id] => 3 [company_name] => Bmw [CEO] => Steve [occ] => 0)
[3] => Array ( [id] => 4 [company_name] => Hardsoft [CEO] => Lucy [occ] => 2)
[4] => Array ( [id] => 5 [company_name] => Lays [CEO] => Morty [occ] => 0)
)
Then sort them by occ so Google will be first, Apple second, Hardsoft third and so on.
How can I archive it?