![]() |
using a variable and conditional in template
i wrote a simple query that returns a numeric value or 1, 2, or 3 etc.
what i want to do is use this variable to make a conditional. $string6 is my variable and it does return proper # can i use this variable in a conditional within a template to do something like this ?? example: Code:
<if $string6="1">Hello</if> i have a shoutcast radio station up, and based on which dj is online i want to show diff info. |
oops i think this is is in wrong forum.
sorry for that. |
Quote:
Try this: <if condition="$string6==1">Hello <else /> <if condition="$string6==2">Goodbye </if> </if> |
thanks much,
i had actually went with the if condition statement, and the double ==, but i put the quotes in wrong spot <if condition=$string6=="1"> or <if condition $string6=="1"> i had been up and down all the combinations i could think of, but the one that works. always something simple that gets me..... LOL !! problem solved. oh yeah, and i am gonna rename it, when i get some more of it sorted out, i had a couple of probs with variables clashing. thanks again. |
All times are GMT. The time now is 08:56 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|