Let’s say I have saved this kind of data (some text ‘.date(d).’ some text) to SQL (with htmlspecialchars()). Now, if I restore htmlspecialchars, is there a way for me to have PHP fill in the date?
Basically I guess what I’m asking is, is there way to turn text into php string?
You can always
eval()a string, but the possible security implications of this are very grave, so I wouldn’t recommend it.If it’s a particular expression, you can substitute it – say, @@date@@ would get string-replaced with an actual
date(d)result.