I have 50 newsletters which all have different email accouts, hex colour codes and twitter accounts. Once the master one has been signed off, I need to copy this 50 times and change these details for each one.
What would be the best way to do this? I know PHP fairly well and also some command line.
At the moment, I can only think to do it the following way:
Create php script with database table values.
Each table row will have the newsletter name, email account, twitter and hex code.
The php script will then look at the name in the filepath (to get the newsletter name) query the database for this name and return the associated values back into variables.
Change the html to have variable place holder then (somehow!) echo out these values within a loop (for every row in the database) and save it as html.
This seems long winded and I am still unsure how to save the final versions as a .html within php.
Any better suggestions?
newsletter.php
Command line:
I think you can get the picture from this.