joshtrav
10-21-2014, 04:48 PM
Long title, heh.
I have a foreach loop iterating through a predefined multidimensional array.
<vb:each from="bans" key="banid" value="k">
<vb:if condition="$bans.$k['duration'] != False">
<td>{vb:raw k.ban_duration}</td>
<vb:else />
<td>∞</td>
</vb:if>
</vb:each>
I am trying to properly evaluate $k["duration"] but cannot. Even when assigned false it will evaluate true in some cases, or false on all in other attempts.
I have tried the following
$bans[$banid]['duration'],
$bans['banid']['duration'],
$bans[banid]['duration'],
$bans[$banid].duration,
etc.,
I have been at it for hours and can't seem to get it to evaluate properly.
I have also tried different options using $k['duration'], etc.
If anyone can shed some light on this it would be greatly appreciated.
I have a foreach loop iterating through a predefined multidimensional array.
<vb:each from="bans" key="banid" value="k">
<vb:if condition="$bans.$k['duration'] != False">
<td>{vb:raw k.ban_duration}</td>
<vb:else />
<td>∞</td>
</vb:if>
</vb:each>
I am trying to properly evaluate $k["duration"] but cannot. Even when assigned false it will evaluate true in some cases, or false on all in other attempts.
I have tried the following
$bans[$banid]['duration'],
$bans['banid']['duration'],
$bans[banid]['duration'],
$bans[$banid].duration,
etc.,
I have been at it for hours and can't seem to get it to evaluate properly.
I have also tried different options using $k['duration'], etc.
If anyone can shed some light on this it would be greatly appreciated.