I currently have this function running to show the time by days, hours minutes etc. However I want to go from the code below to only showing the days, hours & minutes if they are above 1, otherwise to not show it.
function secondsToTime($seconds) {
$dtF = new DateTime("@0");
$dtT = new DateTime("@$seconds");
return $dtF->diff($dtT)->format('%a days, %h hours, %i minutes and %s seconds');
}