I've been busy writing this mail for over 20mins but I just can't explain it properly I guess.
My problem is inserting a php string into html code. The HTML-code is grabbed out of a database, so is the string. I'm making a php mailer system btw.
I tried doing this earlier, but the problem I'm getting is that, when I add <?=$myString;?> to the HTML template (yes, the one from the database) and I send it through mail or print it on a webpage I won't get the value of $myString, but just $myString in pink-purple'ish letters (when viewing the source code in firefox ...) ... in other words, the little piece of php-code doesn't get recognized.
Just to be clear ... I upload my template into the database already with the $strings I need to fill them up with content. The reason for this is because I'm building a dynamic mailersystem, if I would have only 1 contentfield there would be alternatives but I've been busy working on this the last couple of weeks and I don't see any other solution.
So in short:
I have a $string and <html>, both grabbed out of database, they're in seperate tables etc ... I just want to inject $string into <html> ... html already contains <?=$string;?> (for printing the value of the string) but it won't work when I send the mail (getting purple'ish text in source code with firefox ... kind of reminds me of a host which doesn't support php, gives same color to php).
For the record:
I'm using a function to grab my html file out of the database, I declare my $string in the same function and then just return the html (without really doing anything with it ... I thought that as long as the $string gets declared in the same function ... the html file will see it and fill the $string with its value.
I'm sorry if it's really confusing, it's just not easy to explain I guess, easier when you're working with the code.