0

I have some problems with my array. I need to use two queries and push it into array. In result I have table like this:

  1. 28-05-2015 22:08:09
  2. 28-05-2015 22:10:54
  3. 01-06-2015 16:53:21
  4. 03-06-2015 11:24:12
  5. 04-06-2015 21:49:03
  6. 04-06-2015 22:34:00
  7. 05-06-2015 12:51:26(end of array 1)
  8. 01-06-2015 21:39:26(begin of array 2)
  9. 01-06-2015 21:47:36
  10. 01-06-2015 22:03:58(end of array 2)

So I need to filter date to have like this :

  1. 28-05-2015 22:08:09
  2. 28-05-2015 22:10:54
  3. 01-06-2015 16:53:21
  4. 01-06-2015 21:39:26
  5. 01-06-2015 21:47:36
  6. 01-06-2015 22:03:58
  7. 03-06-2015 11:24:12
  8. 04-06-2015 21:49:03
  9. 04-06-2015 22:34:00
  10. 05-06-2015 12:51:26

How can I do this?

Hunter Turner
  • 6,804
  • 11
  • 41
  • 56
Juri Bojka
  • 305
  • 2
  • 8
  • 18
  • You should Google these before posting the question. http://php.net/manual/en/function.array-merge.php – Hozikimaru Jun 05 '15 at 20:02
  • He could also use a UNION SELECT @SurgeonofDeath. – Blue Jun 05 '15 at 20:04
  • This may not be a duplicate. @JohnConde – Blue Jun 05 '15 at 20:04
  • @FrankerZ, Google has potential answers. If he tried anything, then we would need the code. – Hozikimaru Jun 05 '15 at 20:05
  • @FrankerZ How so? Looks like they want to sort by date to me. – John Conde Jun 05 '15 at 20:06
  • I do agree with you @SurgeonofDeath, but I do think it was a bit preemptive to mark this as a duplicate. – Blue Jun 05 '15 at 20:06
  • Yes but array_merge merge 2 tables . I have this i one table – Juri Bojka Jun 05 '15 at 20:06
  • @FrankerZ, I have not marked it as duplicate. What are you basing this assumption on? – Hozikimaru Jun 05 '15 at 20:07
  • @JohnConde, He posted that he has two queries, and he wants them merged/sorted. It could be done through a `UNION SELECT` statement, `array_merge` with php sorting. Just saying, it isn't a clear cut duplicate. – Blue Jun 05 '15 at 20:07
  • @SurgeonofDeath, I didn't mean you marking it as a duplicate. Can only tag one user per comment, that second part of my comment was for John. – Blue Jun 05 '15 at 20:08
  • Without them showing any effort or code you can only make assumptions. This question is off-topic. At least this was they get a point in the right direction. – John Conde Jun 05 '15 at 20:10

0 Answers0