Wednesday, September 12, 2012

CodeIgniter time ago format achieved

http://tutorialsbay.com/codeigniter-time-ago/

I wrote one custom function to achieve this

function display_time($timestamp) {
  $date_array = explode(',', timespan($timestamp, time()));
  $date = $date_array[0] . ' AGO, ';
  return($date);
}

No comments: