【发布时间】:2021-01-06 16:39:22
【问题描述】:
我想在 php (codeigniter) 中做这种事情,当输入开始日期和结束日期时,我想回显这些日期之间的所有财务年度。 财政年度从 01-04-2001 到 31-03-2002(4 月到 3 月)
例如:
public function getfinancialyears(){
$startdate = $this->input->post('Date1'); //13-06-2008 *data from user input in controller
$enddate = $this->input->post('Date2'); //27-01-2020 *data from user input in controller
}
所需的输出: fy = {2008-2009, 2009-2010, 2010-2011,......2019-2020};
*想要一个 logc 可以在数组中显示这些日期之间所有财政年度的输出,以便我可以在循环中使用 fy 数组来相应地获取更多数据。
【问题讨论】:
标签: php arrays ajax codeigniter phppgadmin