Here is what I am trying to accomplish:
I have a text file that is being hand written. There are certain words that aren't being written, but are dynamically generated by the user. Instead of writing the words in the text file, a variable is put in its place. The text file may contain something like this:
Thank you for your purchase of $productName. We hope to see you back in the future!
I need PHP to load the text file, change $productName to
Code: Select all
<?php echo $productName; ?>So, to recap:
I have a text file that includes PHP variables, but is not written in PHP (shorthand). When the file loads, the shortand variables need to be converted into proper PHP syntax.
Any help is appreciated. Thanks!