title: need to join arrays in to single one
body: <p>how can we join this two arrays into one array</p>
  
  <p>for this, I had done my code like this and got the output as shown below</p>
  
  <pre><code>$groups_array = array_map('trim',explode(',', $tt));  
  </code></pre>
  
  <p><code>$tt</code> looks like this <code>string(5) "11:00" string(5) "10:00"</code></p>
  
  <pre><code>array(1) { [0]=&gt; string(5) "11:00" } array(1) { [0]=&gt; string(5) "10:00" } 
  </code></pre>
  
  <p>need desired output to look like </p>
  
  <pre><code>array(1) { [0]=&gt; string(5) "11:00",[1]=&gt; string(5) "10:00" } 
  </code></pre>
  
  <p>My code is here please have a look </p>
  
  <pre><code>&lt;?php $time_booked=$this-&gt;Hospital_model-&gt;get_already_booked_time($d,$timeslot-&gt;doctor_id);
  
     foreach($time_booked as $index1=&gt; $t) {
  
      $tt=$t-&gt;time;
      $groups_array = array_merge(array_map('trim',explode(',', $ttt)));
  
  
  } ?&gt;
  </code></pre>
  
  <p>my <code>var_dump($time_booked)</code> looks like this</p>
  
  <pre><code>array(2) { [0]=&gt; object(stdClass)#40 (1) { ["time"]=&gt; string(5) "11:00" } [1]=&gt; object(stdClass)#41 (1) { ["time"]=&gt; string(5) "10:00" } } 
  </code></pre>