Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Insert HTML

  1. #1
    New Coder
    Join Date
    Nov 2009
    Posts
    72
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Insert HTML

    Hi

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

    Moises

  • #2
    Regular Coder
    Join Date
    Sep 2008
    Posts
    716
    Thanks
    8
    Thanked 17 Times in 16 Posts
    Just break the php code up...
    PHP Code:
    ?>

    HTML STUFF HERE

    <?php
    Then start it again.
    MY MSN: Sith717@Hotmail.com
    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.

  • #3
    New Coder
    Join Date
    Nov 2009
    Posts
    72
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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








    Quote 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; 08-29-2011 at 04:40 PM.

  • #4
    Regular Coder
    Join Date
    Sep 2008
    Posts
    716
    Thanks
    8
    Thanked 17 Times in 16 Posts
    Something like


    <BODY>
    <b> <?php echo $nome_curso; ?> </b>
    </BODY>
    MY MSN: Sith717@Hotmail.com
    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.

  • #5
    New Coder
    Join Date
    Nov 2009
    Posts
    72
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you

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

    Moises



    Quote Originally Posted by bucket View Post
    Something like


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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •