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.
如果我只是输入 ex: Jan 我需要得到 Jan 的所有日期
2013-01-01 2013-01-07 .... ... 2013-07-31
任何人都可以用任何公式或代码建议我吗?
尝试这个:
$totalDays = date('t'); for( $i=1; $i<= $totalDays; $i++) $dates[]= date('Y') . "-". date('m'). "-". str_pad($i,2,'0', STR_PAD_LEFT); var_dump($dates);