function hoursTominutes($time){ $time = explode(':', $time); return ($time[0]*60) + ($time[1]) + ($time[2]/60); }