strtotime issue |
[eluser]behnampmdg3[/eluser]
I use this style all over the site, but I cant find out whats wrong here? What am I doing wrong? Thanks. Code: $this->start_date = $this->input->post('year')."-".$this->input->post('month').'-01';
[eluser]InsiteFX[/eluser]
I think it's because the month is missing the leading 0 (zero).
[eluser]Aken[/eluser]
strtotime()'s second parameter should be a unix timestamp, not a string. http://us1.php.net/manual/en/function.strtotime.php
[eluser]wilron8[/eluser]
Try this code: Code: $this->start_date = $this->input->post('year')."-".$this->input->post('month').'-01'; Since '$this->start_date' is string, you should convert it using strtotime. |
Welcome Guest, Not a member yet? Register Sign In |