Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7

Thread: HTML in Echos

  1. #1
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default HTML in Echos

    Right, does anyone know how to put html coding inside a php echo?

    Im sure you can do it somehow but whenever i try, i get a parse error

    Heres what im doing if you can help solve the problem
    PHP Code:
    <? echo("<img src="$logged[badge].gif">");?>
    Thanks for any help :]

    Edited by L&#181;ke (Forum Moderator): Thread Moved from Website Designing. Please post in the correct section next time, Thanks .
    Last edited by Lµke; 25-04-2007 at 04:46 PM.
    Coming and going...
    Highers are getting the better of me

  2. #2
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php
    echo("<img src=\"$logged[badge].gif\">");
    ?>
    Add back slashes before "

  3. #3
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Thanks Danny +rep
    Coming and going...
    Highers are getting the better of me

  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Or use

    PHP Code:
    <?php echo 'Hello <a href="link.htm">Hi</a>';
    but if you use a ' in the echo, you have to put

    PHP Code:
    <?php echo 'Hello <a href=\'link.htm\'>Hi</a>';

  5. #5
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Thanks Dunko :] +rep
    Coming and going...
    Highers are getting the better of me

  6. #6
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    btw, If you are going to use any of my script up there make sure you add ?> at the end ty

  7. #7
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    BUT if you plan on echoing variables you need to use
    PHP Code:
    echo "<a href=\"page.php?id=$id\">Link</a>"

Posting Permissions

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