I cannot believe I haven't run into this until now. Take a look at what I'm trying to do:
echo "<option value=$my_office[office_id] <? if ($office == $my_office[office_id]) echo \"selected\"; ?>>$my_office[office_name]";
The embedded PHP shows up in the HTML source, instead of executing. So you will see the following when you view source:
<? if ($office == $my_office[office_id]) echo \"selected\"; ?>
I have tried escaping various characters with no success. Is this even possible without breaking it up into multiple ECHO's?
Thanks in advance.
echo "<option value=$my_office[office_id] <? if ($office == $my_office[office_id]) echo \"selected\"; ?>>$my_office[office_name]";
The embedded PHP shows up in the HTML source, instead of executing. So you will see the following when you view source:
<? if ($office == $my_office[office_id]) echo \"selected\"; ?>
I have tried escaping various characters with no success. Is this even possible without breaking it up into multiple ECHO's?
Thanks in advance.