mardi 7 juin 2016

How to output php variable inside of "if"else statment, with html tags

<?php
date_default_timezone_set("America/New_York");
$time = date("F d, Y");
$date = date("g:i A");
$d = date("l");
$t = date("g A");
    if (($d == "Thursday") && (($d < "11 AM") == ($t > "1 PM"))){
        echo "<p>Support Group.<p>
             <p>Conference Call is now live at.</p>
             <p>1-800-555-1212</p>
             <p>The XXXXX Line Code is 12120#</p>";
    } else {
        echo "
        <p>
            <?php echo "$time" ?>
        </p>
        <br>
        <p>
            <?php echo "$date" ?>
        </p>
        ";
};  
?>

I am trying to get the else part of the statement to work. I am trying to get the date and time to display within HTML tags so I am able to style them.

Aucun commentaire:

Enregistrer un commentaire