I've got this down to a two line php file:
$s = "<option value=\"%id%\">%desc%</option>"; die($s);
This will output:
%desc%
If I change the <>s to & l t ; & g t ;
then it works but the string I am trying to output is to be interpreted as HTML.
I don't see anything in the PHP string docs to indicate that <>s are special characters that need escaping. Funny thing is, I have the same problem happening when trying to quote the problem in this forum! Whats the deal?
You are getting the correct output to your browser, that is
<option value=\"%id%\">%desc%</option>
However, your browser is then parsing this as HTML. You can confirm this by viewing the raw HTML source.
If you do not want your browser to parse it as HTML, use <
and >
.