How to combine array info [closed]

This should get the desired result:

//Initial Array
$events = array
(
    array
    (
        'week-day' => 'tuesday',
        'day-date' => 1511841600,
        'events_ids' => array( 83417 )
    ),
    array
    (
        'week-day' => 'wednesday',
        'day-date' => 1511913600,
        'events_ids' => array( 83419, 12345 )
    ),
    array
    (
        'week-day' => 'tuesday',
        'day-date' => 1511830800,
        'events_ids' => array( 83411 )
    )
);

//Array to fill
$tuesday_event_ids = array();

foreach($events as $event ):

    //if day is tuesday & we have event IDs
    if($event['week-day'] === 'tuesday' && count($event['events_ids'])):
        foreach($event['events_ids'] as $id):

            //Push to array if not already in it
            if(!in_array($id,$tuesday_event_ids))
                array_push($tuesday_event_ids, $id);

        endforeach;
    endif;

endforeach;

//should be: array(83417,83411)
var_dump($tuesday_event_ids);

side note: you may want to consider changing the array keys to either be all - based or all _ based for sanity.