Q:

HTML within PHP syntax

I'm trying to show a submit button based on a logical statement using PHP and HTML, but I can't figure out the syntax.
if(isset($_POST['newSubmit'])){ 
    <input type="submit" name="newSubmit" id="newSubmit" value="Select" />;    
}

This doesn't seem to work. Do I need to use an echo statement?

A:

You have to do echo in php or write input outside php
1) echo to display
<?php if(isset($_POST['newSubmit'])){ 
   echo '<input type="submit" name="newSubmit" id="newSubmit" value="Select" />';    
} ?>

2)write html Out side php
<?php if(isset($_POST['newSubmit'])){ ?>
    <input type="submit" name="newSubmit" id="newSubmit" value="Select" />
<?php } ?>

