is time php code example

Example 1: display time php

date(format,timestamp) 
//example
date("Y.m.d") //default timestamp is current time.

Example 2: php time

<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>

Example 3: php time()

<?php
$nextWeek = time() + (7 * 24 * 60 * 60);
                   // 7 Tage; 24 Stunden; 60 Minuten; 60 Sekunden
echo 'Jetzt:          '. date('Y-m-d') ."\n";
echo 'Naechste Woche: '. date('Y-m-d', $nextWeek) ."\n";
// oder strtotime() verwenden:
echo 'Naechste Woche: '. date('Y-m-d', strtotime('+1 week')) ."\n";
?>

Tags:

Php Example