Is it possible to get/import/generate $values based on file names? For example, if the file name were red-green.php, I want the values imported to the page as <?value1='$red' value2='$green';?>. Then, I can do whatever is needed for meta descriptions or content with these values. The reason for this I want to use a template approach for both meta data and content. (e.g. meta description=”What is your favorite color? echo $value1 or echo $value2 ?”) If I could import these values based on a file’s name, it would make it much easier to dynamically create pages without tinkering with each one. I could just create file names like red-green.php, black-yellow.php, etc. Any thoughts on how to do this? Or, is there a better way? Also, please feel free to suggest more efficient alternative methods to accomplish this. I could see a good solution for this would be for values within a page to be generated based on a CSV txt or other database, but I haven’t delved into that yet.
Is it possible to get/import/generate $values based on file names? For example, if the
Share
There is a better way. These should all be in one file. Your file content should be generated based on GET arguments (or clean url request if using an MVC type setup). The url would be something like this:
You could then get these argument values in your code like so: