¿como puedo hacer para que esto: 2.056456 segundos
Se muestre asi: 2.0 segundos?
Código:
<?php $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tiempoinicial = $mtime; ?>
Código:
<?php $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tiempofinal = $mtime; $tiempototal = ($tiempofinal - $tiempoinicial); echo "<span class=\"Estilo7\"><b>(".$tiempototal.") segundos</b></span>"; ?>