Web Analytics Made Easy -
StatCounter Insert HTML - CodingForum

Announcement

Collapse
No announcement yet.

Insert HTML

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Insert HTML

    Hi

    How can I insert HTML tags into a php code whithout using echo or print commands ?

    Moises

  • #2
    Just break the php code up...
    PHP Code:
    ?>

    HTML STUFF HERE

    <?php
    Then start it again.
    MY MSN: [email protected]
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

    Comment


    • #3
      Thanks

      Because of pure HTML I will not use quotes as I used with echo.

      So, which is the correct way to insert variables along the HTML code ?

      '.$nome_curso.'

      or

      .$nome_curso.

      ?

      The problem is that literally is shown $nome_curso and not the variable value.


      <td><font color="#66ccff" face="Arial"><big><strong>
      <font size="5">Pedido de curso</font></strong></big></font>
      <p><font face="Arial"><big><strong>.$nome_curso.</strong></big></font><br>
      <br>
      &nbsp;</td>


      Moises








      Originally posted by bucket View Post
      Just break the php code up...
      PHP Code:
      ?>

      HTML STUFF HERE

      <?php
      Then start it again.
      Last edited by moisesbr; Aug 29, 2011, 11:40 AM.

      Comment


      • #4
        Something like


        <BODY>
        <b> <?php echo $nome_curso; ?> </b>
        </BODY>
        MY MSN: [email protected]
        PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
        PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

        Comment


        • #5
          Thank you

          I was able to insert de variable without having to echo the whole line.

          Moises



          Originally posted by bucket View Post
          Something like


          <BODY>
          <b> <?php echo $nome_curso; ?> </b>
          </BODY>

          Comment

          Working...
          X