- var_dump: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$data_actula = date("Y-m-d");
$danta_anterior = date("Y-m-d", strtotime($data_actula) - (7 * 24 * 60 * 60));
var_dump($data_actula);
var_dump($danta_anterior);