PDA

View Full Version : Why does this condition not work


Mickie D
01-02-2014, 12:52 PM
Hi all, and happy new year :)

I am trying to add a condition to my postbit template and I am not sure why it would not work, both of these conditions work on their own but not with an AND...


<vb:if condition="$post[postcount] % $vboptions[maxposts] ==1 AND $post['islastshown']">MY CODE </vb:if>


Thank you all

kh99
01-02-2014, 01:01 PM
I think you probably want OR instead of AND. It can be kind of confusing because it doesn't always mean quite the same thing in php programming that is does in English.

Mickie D
01-02-2014, 01:25 PM
Brilliant, cheers you are right the OR was perfect, but I found it better to do a != (does not equal) with the condition i needed...

Thanks again KH99

Regards
Mick