How do I insert an HTML page using PHP? -


I wanted to know, is there any way to use PHP without the use of any HTML pages? I do not want to use an external HTML file, I want to write HTML coding directly in PHP coding.

Thank you for your help!

Interwal it:

   & Lt ;? Php / * more php code * /? & Gt; & Lt; P & gt; Blah and lt; / A & gt; & Lt; / Body & gt; & Lt; / Html & gt; & Lt ;? Php / * and even more php * /? & Gt;  

From the perspective of one of the best practices, however, avoid doing this - having a business logic (PHP) and presentation at the same place (HTML) remains harder.

Edit: You can do the same to resolve your comment or use echo :

  & lt ;? Php if (x == 5) {? & Gt; & Lt; P & gt; Blah and lt; / A & gt; & Lt ;? Php} else {echo & lt; P & gt; Bleh & lt; / P & gt; '; }? & Gt;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -