hey guys how are you i wanna a little help in my templates engine im working in some cms script and i use my templates engine it's a simple one the piont is i can't use html if statemnt in my html doc in the sense that i want to use if statement in html code im trying to write some thing like this <select name='onoff'> <if condition='$case==1'> <option value='1'>On</option> <option value='2'>Off</option> <elseif condition="$case==2"> <option value='2'>Off</option> <option value='1'>On</option> </if> </select> and the result always is yes no no yes :S and i want if the case is equal to 1 showing : yes no and if is equal to 2 show no yes and excuse me for my bad english
It depends on which template engine you're using, but you'll probably have to do that in your template, not in raw HTML. It looks as if the template engine is interpreting the HTML. (There might be some tag in that engine to say "leave the following code as it is", like the <pre></pre> tag in HTML.)