variables in HTML?

J

John Salerno

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?
 
T

Toby Inkster

John said:
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>
 
J

John Salerno

Toby said:
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.
 
M

Mike Massonnet

John said:
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 -+-
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top