How to convert days to minutes using PHP

1 Answer

0 votes
function daysToMinutes($days) {
  return $days * 24 * 60;
}

echo daysToMinutes(1) . "\n"; 
echo daysToMinutes(2) . "\n"; 
echo daysToMinutes(7); 


  
  
  
/*
run:
  
1440
2880
10080
  
*/

 



answered Mar 1, 2022 by avibootz
...