<?php $input = '1d 0h 16m 2s'; sscanf($input, '%dd %dh %dm %ds', $d, $h, $m, $s); echo "$input = " . $d * 86400 + $h * 3600 + $m * 60 + $s . " seconds\n";
You have javascript disabled. You will not be able to edit any code.