Results 1 to 5 of 5

How do you use HTML codes in PHP?

This is a discussion on How do you use HTML codes in PHP? within the Programming forums, part of the Web Designing & Development category; How do you use HTML codes in PHP?...

  1. #1
    Junior Member
    Join Date
    Sep 2017
    Location
    delhi
    Posts
    15

    Default How do you use HTML codes in PHP?

    How do you use HTML codes in PHP?


  2. #2
    Member
    Join Date
    May 2017
    Posts
    74

    Default Re: How do you use HTML codes in PHP?

    You can also use HTML code in a PHP script. This can be very useful if you have built your whole page in PHP, but want to include a custom HTML form, for example. All that you need to do is reverse the order of the HTML and PHP opening tags, opening the page with PHP:

  3. #3
    Senior Member
    Join Date
    Dec 2016
    Posts
    142

    Default Re: How do you use HTML codes in PHP?

    we can do like
    HTML in PHP :
    <?php
    echo "<table>";
    echo "<tr>";
    echo "<td>Name</td>";
    echo "<td>".$name."</td>";
    echo "</tr>";
    echo "</table>";
    ?>

  4. #4
    Member
    Join Date
    Aug 2017
    Location
    India
    Posts
    74

    Default Re: How do you use HTML codes in PHP?

    Use of HTML codes in PHP


    You can put the HTML outside of your PHP tags. You can even put it in the middle if you close and reopen the <?php and ?> tags.


    eg. <html>
    <title> HTML </title>
    <body>
    <h1> Example </h1>


    <?php
    // php code
    ?>


    <a> html code </b>

    </body>
    </html>

  5. #5
    Member
    Join Date
    Mar 2018
    Location
    Santa Clara, California, USA
    Posts
    40

    Default Re: How do you use HTML codes in PHP?

    There a lot of ways though I can explain to you how to utilize the HTML codes. Above, them, I'll provide you this easiest one that I got from google.
    Follow the four steps below to create your first web page with Notepad or TextEdit.
    Step 1: Open Notepad (PC) Windows 8 or later:
    Step 1: Open TextEdit (Mac) Open Finder > Applications > TextEdit. ...
    Step 2: Write Some HTML. ...
    Step 3: Save the HTML Page. ...
    Step 4: View the HTML Page in Your Browser.