My problem is that I get the issue
Notice: Trying to get property '7444' of non-object in C:\xampp\htdocs\ex2.php on line 22
days have passed. So it calculates the time, day and etc but it doesn't want to show on my page.
<html>
<link rel="stylesheet" href="8ex2.css">
<body>
<div class="inside">
Welcome <?php echo $_POST["name"]; ?><br>
Your Birthday is: <?php echo $_POST["dob"]; ?><br>
<?php
$date = $_POST["dob"];
$now = time();
$birthDay = strtotime($date);
$newBDate = date("d-M-Y", strtotime($date));
$todaysDate=getdate();
$difference = $now - $birthDay;
$minutes = floor($difference/ (60));
$hours = floor($difference/ (60*60));
$days = floor($difference / (60*60*24));
$weeks = floor($difference / (60*60*24*7));
echo $difference->$days.' days have passed.<br>';
echo $difference->$hours.' hours have passed.<br>';
echo $difference->$minutes.' minutes have passed.<br>';
?>
</div>
</body>
</html>
Which I don't understand is there something that I am doing incorrectly in my PHP?