Advertisement
cdsatrian

tampilkan tanggal 1 tahun

Feb 12th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. <?php
  2. $tahun=2017;
  3. $i=0;
  4. $d='';
  5. while($d<date('Y-m-d',strtotime("{$tahun}-12-31"))){
  6. $d=date('Y-m-d',strtotime("{$tahun}-01-01"." +".($i++)." day"));
  7. echo $d."<br>";
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement