Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • how to print the HTML code in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 327
    Comment on it

    If you want to print the html tags and code inside the PHP code you can do it by putting all the html code inside the echo syntax:-

    Consider the following two cases:-

    1. In between PHP tags
    
    <?php if(condition){ ?> //In this case the html code is written between the PHP code.
     <!-- html code -->     <input type="text">
    <?php } ?>
    
    2. In an echo
    
    if(condition){//in this condition you can put all of your html code inside the echo "" syntax.
         echo "<input type="text">"; //html code 
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: