Updating html with php

Hi guys

sounds quite simple im just not sure how to put this together

i have a html website with about 3 pages…these all refer to one company. I want to duplicate this site for other companies but just change the name of the company within the text

instead of doing this physically in each of the html files is there a way i can assign a variable in a seperate configuration file and then in all the places where the company name is in the html files…get them to pull the companyname from the config file?

how do i set this up?

thanks

You could create a config.php file like


<?php
$companyName = 'My Company';
?>

And then make page1, page2 and page3 like


<?php
include('config.php');
?>
Welcome to the website of <?php echo $companyName; ?> ....

So basically every time you want to show the company name, just use <?php echo $companyName; ?>

FYI, doing this sounds like a very bad idea in terms of Duplicate Content.

thanks a lot :smiley: