![]() |
How long ago[solved] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How long ago[solved] (/showthread.php?tid=42449) |
How long ago[solved] - El Forum - 06-07-2011 [eluser]R_Nelson[/eluser] I'm trying to write a how long ago helper i have Code: $chunks = array( How long ago[solved] - El Forum - 06-07-2011 [eluser]LuckyFella73[/eluser] It depends what "type" of time you want to pass to your helper. Years, months, days, hours, milliseconds? If all of them you need to pass a second parameter to tell the helper what "type" you have as a base to calculate the seconds. EDIT: maybe this one can help you further: http://ellislab.com/codeigniter/user-guide/helpers/date_helper.html How long ago[solved] - El Forum - 06-07-2011 [eluser]R_Nelson[/eluser] all i want to do is ad seconds to that array i am just guessing at it but im thinking i just need to add 60 * to each one of those and add a 60 for seconds How long ago[solved] - El Forum - 06-07-2011 [eluser]R_Nelson[/eluser] figured it out i had to read it better but theres 1 sec in 1 second so i had to put Code: $chunks = array( |