Problem when subtracting PHP Dates [duplicated]

0

I am doing a code to subtract dates, but when executing it I get a message that I can not correct, I leave the code and the message.

I would like to help me see how I can correct it

<?php
require("../conexion.php");
 
$consulta = "SELECT * FROM tpersonal WHERE TPER_IDPER='2525'";
 
$resultado = $mysqli->query($consulta); 
$row = $resultado->fetch_array();



$fecha_inicio = date('Y/m/d');
$fecha_fin = date ('Y/m/d', strtotime($row['TPER_FECHA']));
$total = date($fecha_fin) - date ($fecha_inicio);
echo "<p> Fecha de hoy: $fecha_inicio </a> </p>";
echo "<p> Fecha que vence: $fecha_fin </a> </p>";
echo "<p> Total: $total </a> </p>";



?>

    
asked by Erik Raúl González Páez 01.11.2018 в 18:52
source

0 answers