|All requests||>||Meta Symbol replacement in text||>||Request new recommendation||>||Featured requests||>||No recommendations|
by Brian Read - 5 years ago (2016-03-23)
I want to be able to process a piece of html and substitute meta symbols in the text by the contents of the corresponding field in a database, generating an html page which includes the contents of the current MySQL record. I need to do this for multiple records.
1. by Manuel Lemos - 5 years ago (2016-03-23) Reply
Do you need a sort of template engine that replaces marks with data from a database?
2. by Brian Read - 5 years ago (2016-03-24) in reply to comment 1 by Manuel Lemos Comment
yes i guess so...
3. by Brian Read - 5 years ago (2016-03-24) in reply to comment 2 by Brian Read Comment
ok, I used "template engine" as a search term and found a number of options. Thanks for the help.
4. by Manuel Lemos - 5 years ago (2016-03-24) in reply to comment 3 by Brian Read Comment
Sure, no problem. There are many template engine classes but not many that integrate database results directly. Most take arrays and iterate over sections.
If you want to show a data grid for displaying or editing database records, there are more adequate packages for that purpose.
In general there are template classes that can iterate over arrays with data taken from database query results.
This class is a template engine that can do that, as well extract the SQL query results with special tags.