<p>I have video durations stored in HH:MM:SS format. I'd like to display it as HH hours, MM minutes, SS seconds. It shouldn't display hours if it's less than 1.</p>

<p>What would be the best approach?</p>

Something like this?
```
```
$vals = explode(':', $duration);

if ( $vals[0] == 0 )
   $result = $vals[1] . ' minutes, ' . $vals[2] . ' seconds';
else
   $result = $vals[0] . 'hours, ' . $vals[1] . ' minutes, ' . $vals[2] . ' seconds';
```
```