title: how to insert data array to another array
body: <p>I want to check if the data is same then don't print the data but push that data to the first data.</p>
  
  <p>for example I have data array like this:</p>
  
  <pre><code>0 =&gt; array:4 [▼
      "StartTime" =&gt; "00:00:00"
      "type" =&gt; 1
      "DateAppointment" =&gt; "2019-02-24"
      "SDay" =&gt; "Sun"
    ]
  1 =&gt; array:4 [▼
      "StartTime" =&gt; "00:00:00"
      "type" =&gt; 1
      "DateAppointment" =&gt; "2019-02-25"
      "SDay" =&gt; "Mon"
    ]
  2 =&gt; array:4 [▼
      "StartTime" =&gt; "00:00:00"
      "type" =&gt; 1
      "DateAppointment" =&gt; "2019-02-26"
      "SDay" =&gt; "Tue"
    ]
  3 =&gt; array:4 [▼
      "StartTime" =&gt; "00:10:00"
      "type" =&gt; 1
      "DateAppointment" =&gt; "2019-02-24"
      "SDay" =&gt; "Sun"
    ]
  </code></pre>
  
  <p>data <code>array</code> 0, 1, 2 has the same StartTime, so I want my data to be like this</p>
  
  <pre><code>0 =&gt; array:10 [▼
      "StartTime" =&gt; "00:00:00"
      "type" =&gt; 1
      "DateAppointment" =&gt; "2019-02-24"
      "SDay" =&gt; "Sun"
      "type1" =&gt; 1
      "DateAppointment1" =&gt; "2019-02-25"
      "SDay1" =&gt; "Mon"
      "type2" =&gt; 1
      "DateAppointment2" =&gt; "2019-02-26"
      "SDay2" =&gt; "Tue"
    ]
  1 =&gt; array:4 [▼
      "StartTime" =&gt; "00:10:00"
      "type" =&gt; 1
      "DateAppointment" =&gt; "2019-02-24"
      "SDay" =&gt; "Sun"
    ]
  </code></pre>
  
  <p>is that possible?</p>
  
  <p>my script is like this</p>
  
  <pre><code>$interval = 10;
  $hourMinInterval = 60 - $interval;
  for ($i = 0; $i &lt;= 23; $i++){
      for ($j = 0; $j &lt;= $hourMinInterval; $j+=$interval){
  
          $h = sprintf('%02d',$i);
          $m = sprintf('%02d',$j);
          $clock[] = $h.':'.$m.':00';
  
          if ($lastdate != 'lastsunday') {
              $timestampa = $lastdate;
          } else {
              $timestampa = strtotime('last Sunday');
          }
  
          for($ble=0;$ble&lt;7;$ble++){
              $timeC = sprintf('%02d',$i).':'.sprintf('%02d',$j).':00';
              $tgla = strftime('%Y_%m_%d', $timestampa);
              $dateS = str_replace('_','-',$tgla);
              $sday = strftime('%a', $timestampa);
              $timeCs = array('StartTime'=&gt;$timeC, 'type'=&gt;1, 'DateAppointment'=&gt;$dateS, 'SDay'=&gt;$sday);
              $timestampa = strtotime('+1 day', $timestampa);
  
              if ($timeC == $timeCs['StartTime']) {
                  $statusssss[] = $timeCs;
              }else{
                  $statusssss[] = '';
              }
          }
      }
  }
  </code></pre>
  
  <p>If you have another way or any example with jsfiddle will be appreciated.</p>