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!


Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default Table inside a Echo without errors..

    I'm trying to code a table inside one echo.

    It says unexpected t string on the first line..
    It's not a matter of alot of adding alot of / is it.
    PHP Code:
    echo "<font face="verdana"><table class="style9" border="0" width="356">
        <tbody>
        <tr><td class="
    style7" align="middle" bgcolor="#bce0ee" width="76" height="14"><div class="style2" align="center"><strong><font size="1">Day:</font></strong></div></td>
          
    <td class="style9" align="middle" bgcolor="#bce0ee" width="118" height="14"><div class="style2" align="center"><strong><font size="1">Event:</font></strong></div></td>
          <
    td class="style9" align="middle" bgcolor="#bce0ee" width="148" height="14"><div class="style2" align="center"><strong>Info:</strong></div></td>
      </
    tr></tbody></table>
      <
    table class="style9" border="0" width="356">

        <
    tbody>
        <
    tr><td class="style7" align="middle" bgcolor="#bce0ee" width="76" height="14"><div align="center">$day</div></td>
          <
    td class="style9" align="middle" bgcolor="#bce0ee" width="118" height="14"><div align="center"><font size="1"><font face="verdana"><span class=\"event_name\">$event</span></font></font></div></td>
          <td class="
    style9" align="middle" bgcolor="#bce0ee" width="148" height="14"><div align="center"><font size="1"><font face="verdana">$description</font></font></div></td>

      
    </tr></tbody></table>"; 
    Last edited by Colin-Roberts; 20-11-2008 at 09:58 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  2. #2
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Use ' or \"
    Back for a while.

  3. #3
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    PHP Code:
    echo "<font face=\"verdana\"><table class=\"style9\" border=\"0\" width=\"356\">
        <tbody>
        <tr><td class=\"style7\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"76\" height=\"14\"><div class=\"style2\" align=\"center\"><strong><font size=\"1\">Day:</font></strong></div></td>
          <td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"118\" height=\"14\"><div class=\"style2\" align=\"center\"><strong><font size=\"\1"
    >Event:</font></strong></div></td>
          <
    td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"148\" height=\"14\"><div class=\"style2\" align=\"center\"><strong>Info:</strong></div></td>
      </tr></tbody></table>
      <table class=\"style9\" border=\"0\" width=\"356\">

        <tbody>
        <tr><td class=\"style7\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"76\" height=\"14\"><div align=\"center\">
    $day</div></td>
          <td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"118\" height=\"14\"><div align=\"center\"><font size=\"1\"><font face=\"verdana\"><span class=\"event_name\">
    $event</span></font></font></div></td>
          <td class=\"style9\" align=\"middle\" bgcolor=\"#bce0ee\" width=\"148\" height=\"14\"><div align=\"center\"><font size=\"1\"><font face=\"verdana\">
    $description</font></font></div></td>

      </tr></tbody></table>"

    I missed one but I can't seem to edit it in. :S But I think you get the idea.
    Last edited by wsg14; 20-11-2008 at 10:02 PM.

  4. #4
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    It really is a matter of using /"

    Simply just use ' instead of " on the echo to save you the hastle of adding a load of slashes.

  5. #5
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Collin i thought u were gd at php lol

  6. #6
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    I'm alright at it. it's the stupid mistakes that get me.

    got it fixed..
    Last edited by Colin-Roberts; 20-11-2008 at 10:27 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  7. #7
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    I don't even code PHP and I realised the issue instantly :S You obviously can't be that great of a coder.

  8. #8
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Awfy View Post
    I don't even code PHP and I realised the issue instantly :S You obviously can't be that great of a coder.
    Naa, Collin has a good point. When you are at a certain level you miss out obvious mistakes such as ; and closing the " etc.

    I used to do it

    Also Greg why don't you learn PHP somewhen? You have ONE of the best coders on the forum working with you so..?

  9. #9
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Naa, Collin has a good point. When you are at a certain level you miss out obvious mistakes such as ; and closing the " etc.

    I used to do it

    Also Greg why don't you learn PHP somewhen? You have ONE of the best coders on the forum working with you so..?
    All the more reason not to learn it when other people can

  10. #10
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Awfy View Post
    All the more reason not to learn it when other people can
    Fair dos.

    But it could help you in the future. Somebody could be like

    "Tell me how i would display text"

    "ECHO "TEXT";" ZOmG

Page 1 of 2 12 LastLast

Posting Permissions

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