Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用drupal form api为选择列表元素生成时间列表(例如:上午1:00,上午2:00 .....12PM)?如果没有,最好的方法是什么?
在 PHP 中你可以使用
foreach(range(1,24) as $time) { $hours[] = date("g:i a", strtotime($time.":00:00")); }