Code / PHP Snippets / Function: time2seconds()

  1. function time2seconds($time) {
  2.         $total = 0;
  3.         list($minutes,$seconds) = explode(":",$time);
  4.         $total += $seconds+(intval($minutes)*60);
  5.         return $total;
  6. }

Download as Text : January 6th, 2009