SHARE
TWEET

Untitled

a guest Aug 19th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.     Fecha de mañana en PHP, de manera elegante
  4.     parzibyte.me/blog
  5. */
  6. $ahora = time();
  7. # Le decimos que ahora, + 1 día
  8. $manana = strtotime("+1 day", $ahora);
  9. $mananaLegible = date("Y-m-d", $manana);
  10. # ahoraLegible únicamente es para demostrar
  11. $ahoraLegible = date("Y-m-d", $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