variables in HTML?

Discussion in 'HTML' started by John Salerno, Jan 27, 2006.

  1. John Salerno

    John Salerno Guest

    Aside from scripting, is there a way to use variables in HTML? For
    example, if I want to define the description attribute of the meta tag,
    but I also need to include that description in the body of the page, is
    there a way to define the string once and then use a variable in the
    HTML to refer to it?

    If not, is this something you can do with PHP?
     
    John Salerno, Jan 27, 2006
    #1
    1. Advertising

  2. John Salerno

    Toby Inkster Guest

    John Salerno wrote:

    > If not, is this something you can do with PHP?


    You can do it in PHP.

    <? $desc = "Flibble flobble flubble!"; ?>
    ....
    <meta name="description" value="<?=$desc?>">
    ....
    <p><b>Description:</b> <?=$desc?>.</p>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 27, 2006
    #2
    1. Advertising

  3. John Salerno

    John Salerno Guest

    Toby Inkster wrote:
    > John Salerno wrote:
    >
    >> If not, is this something you can do with PHP?

    >
    > You can do it in PHP.
    >
    > <? $desc = "Flibble flobble flubble!"; ?>
    > ...
    > <meta name="description" value="<?=$desc?>">
    > ...
    > <p><b>Description:</b> <?=$desc?>.</p>
    >


    Awesome, thank you. But if I plan to compile these files into a CHM,
    does that mean I can't use PHP? I know they would all become PHP files
    insetad of HTML, but aside from that, would the script even be able to
    run on a personal computer, or does it require a server with all the PHP
    stuff installed?

    Thanks.
     
    John Salerno, Jan 27, 2006
    #3
  4. John Salerno wrote:

    > Toby Inkster wrote:
    >> John Salerno wrote:
    >>
    >>> If not, is this something you can do with PHP?

    >>
    >> You can do it in PHP.
    >>
    >> <? $desc = "Flibble flobble flubble!"; ?>
    >> ...
    >> <meta name="description" value="<?=$desc?>">
    >> ...
    >> <p><b>Description:</b> <?=$desc?>.</p>
    >>

    >
    > Awesome, thank you. But if I plan to compile these files into a CHM,
    > does that mean I can't use PHP? I know they would all become PHP files
    > insetad of HTML, but aside from that, would the script even be able to
    > run on a personal computer, or does it require a server with all the PHP
    > stuff installed?
    >
    > Thanks.


    This way you will maybe need a tool like webhttrack to create a local copy
    of the dynamic pages and use them for the creation of your chm file.

    --
    > ...qoique parfois c'est super pratique ! et le syteme debain évite pas mal
    > d'erreur humaine :) qui sont à vrai dire les plus fréquentes ....

    Il ne faut pas jeter le systeme linux avec l'eau debain.
    -+- Kevin in GFA : Bien configurer sa GNU/debaignoire -+-
     
    Mike Massonnet, Jan 27, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. avnrao
    Replies:
    0
    Views:
    3,398
    avnrao
    May 7, 2004
  2. Replies:
    1
    Views:
    967
  3. dwok
    Replies:
    7
    Views:
    732
    Hal Rosser
    Mar 4, 2005
  4. Replies:
    9
    Views:
    1,015
  5. Adam Akhtar
    Replies:
    9
    Views:
    599
    Florian Gilcher
    Aug 16, 2008
Loading...

Share This Page