1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How Do I declare constants in HTML?

Discussion in 'HTML & Website Design' started by david_sakh, Nov 2, 2004.

  1. #1
    I want to use a number or a string several times on a shtml page. Can I declare a variable and use it later? What is the syntax?

    
    int i=5;
    <td colspan=i;>
    
    Code (markup):
    That's basically the psuedo-code I need translated. Thanks. I did a google search on this and had no luck - appearantly this isn't widely done, or at least isn't widely described in tutorials. :(
     
    david_sakh, Nov 2, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    HTML isn't a programming language, you would need to use JavaScript or a server-side system like SSI or PHP.
     
    digitalpoint, Nov 2, 2004 IP
  3. expat

    expat Stranger from a far land

    Messages:
    873
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    quick tutorial ssi - http://www.tdscripts.com/ssi.htmlquick php - http://us2.php.net/tut.php

    Pitfall: if you start using php you may have to set a "handler" as most servers are set up to only interpret pages ending .php but you can set this to any or specific endings like .shtml etc. thus you don't have to rename pages.

    M
     
    expat, Nov 3, 2004 IP
  4. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Or, dare I say it, use ASP :)
     
    mopacfan, Nov 3, 2004 IP
  5. dejaone

    dejaone Well-Known Member

    Messages:
    992
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    143
    #5
    without programming, you can try XML
     
    dejaone, Nov 3, 2004 IP