seconds to minutes and days to weeks

后端 未结 3 1685
时光说笑
时光说笑 2020-12-19 19:26

My question is, how with PHP we can have an automated system, which can do this: If we have $seconds= 120; And the script should get this value, see that this

3条回答
  •  囚心锁ツ
    2020-12-19 20:06

    You could use something as simple as:

    $seconds = 120;
    $minutes = floor($seconds/60);
    echo $minutes.' min';
    

    Am not really sure if I have understood your question properly though.

提交回复
热议问题