SHARE
TWEET

Untitled

a guest Aug 19th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.     Fecha de mañana en PHP, con precisión de segundos
  4.     parzibyte.me/blog
  5. */
  6. $ahora = time();
  7. $unDiaEnSegundos = 24 * 60 * 60;
  8. $manana = $ahora + $unDiaEnSegundos;
  9. $mananaLegible = date("Y-m-d H:i:s", $manana);
  10. # ahoraLegible únicamente es para demostrar
  11. $ahoraLegible = date("Y-m-d H:i:s", $ahora);
  12. echo "Hoy es $ahoraLegible y mañana es $mananaLegible";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top