I’m trying to execute the following code:
<label for="gender">Gender*: </label>
<select name="user[test]" id="gender">
<? echo "THISISATEST"?>
<option value="-1"> - Select - </option>
</select>
And it doesn’t do anything.
However, this works fine:
<select name="user[test]" id="gender">
<option value="-1"> - Select - </option>
</select>
<? echo "THISISATEST"?>
What’s going on?
Thanks!
Edit: I’m an idiot, I tried to simplify the problem for posting on here, turns out the echoing is appearing in the soruce and the line where I try to dynamically create the just isn’t working. Derp. I forgot to surround my shorthand if?else: with brackets, which caused the whole line not to echo.
Thanks
Are you entirely certain short tags are enabled on your server? I’d just double check
<?php echo "THISISATEST"; ?>and see if that improves your luck. Also, did you view source – because that value may have been hidden on a rendered page when in a select as such.