开发者

How to get all appointments title at same date from array in php?

开发者 https://www.devze.com 2023-03-16 17:29 出处:网络
I need to find the all appointments at the same date. Appointments are saved in the appointments table in timing fields and title of appointment is also saved in the title field. I fetch the associat

I need to find the all appointments at the same date.

Appointments are saved in the appointments table in timing fields and title of appointment is also saved in the title field. I fetch the associative array from the SQL query, which is hidden by the following code:

$appt = $u->getAppointments($starttime,$endtime);

Now I want to fetch the all the appointments title at same date like so:

[2011-07-02 12:21:00] => "title1","title2"
[2011-07-03 01:03:00] => "name1","name开发者_开发问答2","name3"


By hidden, I'll infer that you have no access to the code, or what it's doing? It would appear that the method exposed asks for a $starttime,$endtime, so why not just implement a simple form that asks for a date, with some date picker ...

  • http://php.net/manual/en/function.time.php
  • http://www.php.net/manual/en/function.mktime.php
  • or my personal favorite: http://ch.php.net/manual/en/class.datetime.php

If your question is related to the getAppointments($starttime,$endtime) and modifying that, you should post the source of that method so that people can help you out. Otherwise, timestamps are your friend.

0

精彩评论

暂无评论...
验证码 换一张
取 消