View Single Post

  #1 (permalink)  
Old 05-27-2005
Hello
 
Posts: n/a
Default Inserting values to files, similar to templates

Hello,

I don't need the code or anything, just the idea.

My project will generate a file with PHP code. It is being done by
getting a standard PHP file that acts like a template for future PHP
generated files. However, there are some portions that will be changed in
the newly generated PHP files.

How would I approach this efficiently so I could insert a different code
into PHP template and save it as a different file?

Do I put some kind of a tag then open the template, search for the tag and
replace it?

Or, do I put in string values parts of the code that don't change then I put
them together with the changes values in between?

I want it to be less messy since the template might be changed one day.

Thank you.


Reply With Quote