-4

I got the array in the below mentioned format with name "Result". But I want the Array as mentioned below with name "Desire_result". Kindly help me what to do next so that I can achieve it.

Result:

<?php 
Array
(
    [0] => Array
        (
            [0] => 2017-01-01
            [1] => 2017-01-15
            [2] => 2017-01-20
            [3] => 2017-01-30
        )

    [1] => Array
        (
            [0] => 2017-02-01
            [1] => 2017-02-12
            [2] => 2017-02-17
            [3] => 2017-02-25
        )

    [2] => Array
        (
            [0] => 2017-03-01
            [1] => 2017-04-01
            [2] => 2017-04-15
            [3] => 2017-04-25
        )

    [3] => Array
        (
            [0] => 2017-05-01
            [1] => 2017-05-13
            [2] => 2017-05-20
            [3] => 2017-05-26
        )

    [4] => Array
        (
            [0] => 2017-06-01
            [1] => 2017-06-25
            [2] => 2017-07-15
        )

)
?>

Desire_result:

<?php
Array
(

    [0] => 2017-01-01
    [1] => 2017-01-15
    [2] => 2017-01-20
    [3] => 2017-01-30        
    [4] => 2017-02-01
    [5] => 2017-02-12
    [6] => 2017-02-17
    [7] => 2017-02-25
    [8] => 2017-03-01
    [9] => 2017-04-01
    [10] => 2017-04-15
    [11] => 2017-04-25
    [12] => 2017-05-01
    [13] => 2017-05-13
    [14] => 2017-05-20
    [15] => 2017-05-26
    [16] => 2017-06-01
    [17] => 2017-06-25
    [18] => 2017-07-15
) 
?> 

1 Answers1

0
$desiredResult = array_merge(...$myResult);
Mihai Matei
  • 24,166
  • 5
  • 32
  • 50