Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Fecha de mañana en PHP, con precisión de segundos
- parzibyte.me/blog
- */
- $ahora = time();
- $unDiaEnSegundos = 24 * 60 * 60;
- $manana = $ahora + $unDiaEnSegundos;
- $mananaLegible = date("Y-m-d H:i:s", $manana);
- # ahoraLegible únicamente es para demostrar
- $ahoraLegible = date("Y-m-d H:i:s", $ahora);
- echo "Hoy es $ahoraLegible y mañana es $mananaLegible";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement