I'm trying to check if the date in the database and today's date is same or not. If yes, then echo a message.
this is the code i'm using
    <?php 
    $date = date("Y - m - d ");
    $matchingdate = $_REQUEST['ending'];
    ?>
 <?php  if ($date == $matchingdate) {
    echo "Yes, Same";
    } else 
    { 
    echo "not same";
    } ?>
How do i insert this if statement within a tag ?
This is what my table looks like
echo "<td>" . $row["name"] . "</td>";
                echo "<td>" . $row["joining"] . "</td>";
                echo "<td>" . $row["ending"] . "</td>"; 
I tried adding like this
Echo "<td>" . if ($date == $matchingdate) {
echo "Yes, Same";
} else 
{ 
echo "not same"; . "</td>"
 
    