I know php can make that easier... Something about editing one page and all the webpages using that table will change to what I want. Does anyone know how to do this?
Table Layouts using PHP
Moderator: General Moderators
Table Layouts using PHP
I know php can make that easier... Something about editing one page and all the webpages using that table will change to what I want. Does anyone know how to do this?
- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
enter the include() function. lets say you have a menu:
and you put that in a file menu.html
now you want to put that menu into you 100's of files. easy, watch this:
and thats it. hope that helps
Code: Select all
<table>
<tr>
<td>Item 1</td>
<td>Item 2</td>
<td>Item 3</td>
. . .
</tr>
</table>now you want to put that menu into you 100's of files. easy, watch this:
Code: Select all
<?php
//some content, some code
//now lets include that menu
include("menu.html"); //be sure to provide a correct relative path or absolute path to the file
//some more content, some more code
?>You even don't need PHP, you can use ssi: make extention for your web-pages like .shtml and write <-#include file="file.html"->
Sincerely,
Sergey Booyny
AlarIT programmer
http://www.AlarIT.com
Sincerely,
Sergey Booyny
AlarIT programmer
http://www.AlarIT.com