PHP CodeIgniter 时间相减 和 大小相减 疑问
<table>
<?php
foreach ( $testinfo as $key => $value)
{
?>
<tr>
<td> <?php echo $value['nrttime']/60; ?>秒</td>
<td class="mayhang2"><?php echo $value['rttime']/60; ?>秒</td>
<td><?php echo round($value['nrtsize']/1024/1024, 2); ?>MB</td>
<td class="mayhang2"><?php echo round($value['rtsize']/1024/1024, 2); ?>MB</td>
</tr>
<?php } ?>
</table>
----------------------------------------------------------------
我的想法是
一:用nrttime 减去rttime 怎么去减?时间
二:用nrtsize 减去rtsize 怎么去减?大小
codeigniter php
[解决办法]
<?php echo ($value['nrttime'] - $value['rttime'])/60;?>
<?php echo round(($value['nrsize'] - $value['rtsize'])/1024/1024,2);?>