время php
<?php
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>
Clean Code Dev
<?php
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>
<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>
Return the current time as a Unix timestamp, then format it to a date:
<?php
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>
<?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";
?>