Sorry, what I was meaning is this:
In the function in my code, an email is sent - the contents of which are retrieved from a file.
I wanted the email to be personalised, so I thought on an offchance that maybe one could simply embed php variables into the file, such as:
"Hello $firstname $surname"
However, when this is read into php, the 'variables' are treated as plain text (so the email to the individual actually does rea "Hello $firstname $surname").
I was just wondering if there was a way in php to read files (actually, to parse variables) and to treat any embedded variables AS variables - not as plain text.
I've got around the problem now by using several lots of str_replace(), but I still wonder if there's a more elegant way of doing it.
Hope this clears up the explanation!