2009-08-31 17 views

cevap

33

Bak() ve strtotime():

echo date('Y'); 
echo date('Y', strtotime('+1 year')); 
13

Bir tarih bir kısmını ayıklamak için tarih fonksiyonunu kullanabilirsiniz:

$year = date("Y"); // get the year part of the current date 
$nextYear = $year + 1; 

pasajını here çalıştırın.

0

Kullanım getdate() fonksiyon işlevleri tarihte

0

... ve strftime('%Y') yapar çok

6
<?php 
$date="2010-04-30"; 
$y = date('Y',strtotime($date)); 
echo $y; 
?> 
İlgili konular