I am going to create a HTML generator based on PHP, this generator will help me to create some HTML file. The HTML file's content is based on the data input by user. Is there any PHP class or PHP framework I can used to develop this tools in a easy way?
Asked
Active
Viewed 813 times
1
-
2What exactly are your requirements for an "HTML generator"? – deceze Jun 10 '11 at 08:04
-
3PHP is an HTML generator. You can use any framework or libs – Brice Favre Jun 10 '11 at 08:04
-
The requirement is user can choose how many columns/rows in a table, then what is the image name in each cell. Basically, it is a generator for EDM(like the newsletter we receive on the email) – Charles Yeung Jun 10 '11 at 08:08
2 Answers
4
PHP is also known as "Hypertext Preprocessor", so all you need is PHP itself in order to "generate" html files. PHP can interpret data inputs and give wanted outputs as an html file. Actually it's the only way that PHP works.

Onur Senture
- 519
- 5
- 16
-
Please see my comments above, I want to create .html file, likes Excel create .xls file, it help me to do the routine works automatically instead of using Dreamweaver to make the table and creating .html file manually. – Charles Yeung Jun 10 '11 at 08:15
1
most PHP frameworks have (or implement the ability from extensions) the functionality you need. e.g. Cakephp has the so-called helper classes, some of which are used to generate html content.
example (cakePHP):
echo $this->Form->input($params);
this generates input controls based on parameters passed to it.

Headshota
- 21,021
- 11
- 61
- 82
-
Thanks for the suggestion, but how could I create the form by CakePHP to receive user's data and pass to the HTML file. More reference would be appreciated – Charles Yeung Jun 10 '11 at 08:17
-
Here I posted in the answer, the reference from Cakephp cookbook. you can veiw examples of functionality. – Headshota Jun 10 '11 at 08:27