Snippet Name: Convert Hours to Minutes Description: Simple hours to minutes conversion code. Also see:» Get Relative Dates and Times » Calculate the difference between two t... » Convert Minutes to Hours » Convert Standard time to 24-hour time ... » Days in month #2 » Days in month one » Convert minutes to hours #2 » Convert minutes to hours one Comment: (none) Language: PHP Highlight Mode: PHP Last Modified: March 16th, 2009
Description: Simple hours to minutes conversion code.
Also see:» Get Relative Dates and Times » Calculate the difference between two t... » Convert Minutes to Hours » Convert Standard time to 24-hour time ... » Days in month #2 » Days in month one » Convert minutes to hours #2 » Convert minutes to hours one
<?PHP FUNCTION h2m($hours) { $t = EXPLODE(".", $hours); $h = $t[0]; IF (ISSET($t[1])) { $m = $t[1]; } ELSE { $m = "00"; } $mm = ($h * 60) $m; RETURN $mm; } ?>