I have this PHP array:
$statuses = array(
'delivery-ongoing' => array("status" => "at-10", "traffic" => "FCL", "type" => "export"),
'delivered' => array("status" => "at-13", "traffic" => "FCL", "type" => "export"),
'delivery-ongoing' => array("status" => "00--00", "traffic" => "FCL", "type" => "import"),
'return-to-ongoing' => array("status" => "to-04", "traffic" => "FCL", "type" => "import"),
'delivered' => array("status" => "at-13", "traffic" => "FCL", "type" => "import")
);
I have to select status by key "delivery-ongoing" where type = "import"
I can play with the array structure since is a constant within my class.
I tried
$statuses['delivery-ongoing']['status']
How do I get the right status for type = "import"
Is there a sort of loop I have to do or there is another way to do this?
delivery-ongoingappears twice.