如何在if语句中回显PHP和HTML

I have an if statement that only has to show some code if the value of $result37 = ncrteam... but how can I echo that HTML and PHP code? echo" "; is not working and echo ' '; Is also not working.

This is my code:

<?php
    if ($result37 === "ncrteam") {
?>
Status:<br>
    <select class="form-control" name="status" style="width: 300px">
        <?php
            while ($row15 = mysqli_fetch_assoc($result15)):; ?>
                <option selected value=\"<?php echo $row15['status'];?>\"><?php echo $row15['status'];?></option>
        <?php endwhile;?>
        <?php while ($row16 = mysqli_fetch_assoc($result16)):; ?>
                <option value=\"<?php echo $row16['statusname'];?>\"><?php echo $row16['statusname'];?></option>
        <?php endwhile;?>
    </select>
<?php
    }
?>

This is not a complete answer, because it is unclear what exactly you are trying to do, but your question looks something like How do I build html based on values of my php variables and I will try to answer it as best I can

With the limited information I have from your question, I think this is the kind of thing you are trying to do:

 <?php

 ... 
 $html = "";
 if ($result37 === "ncrteam") {
    while ($row15 = mysqli_fetch_assoc($result15))
    {
         $html .= "<option value=".$row15['status'].">";
    }
 }
 ?>

<html>
    <body>
        ...
        <select>
            <?php echo $html; ?>
        </select>
        ...
    </body>
</html>