PDA

View Full Version : Condition statement



steven s
Mon 9th Jan '06, 12:24am
I'm using the following statement to test if the field is emty.
<if condition="$bbuserinfo[field20]">
<td class="alt1" align="center">$bbuserinfo[field20] </td>
<else />
<td align="center" bgcolor="#ffff66">
<font size="-2">required </font></td>
</if>It works fine except that if the field = 0, the statement is false.
How can rewrite it so as long as something is in the field, the statement is true.

TyleR
Mon 9th Jan '06, 12:27am
<if condition="$bbuserinfo[field20] !=''">
<td class="alt1" align="center">$bbuserinfo[field20] </td>
<else />
<td align="center" bgcolor="#ffff66">
<font size="-2">required </font></td>
</if>

steven s
Mon 9th Jan '06, 12:30am
That was quick. I though I'd be able to go to sleep. :)
!= is NOT?

TyleR
Mon 9th Jan '06, 1:38am
Yep.