Announcement

Collapse
No announcement yet.

Condition question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Condition question

    How can i make a condition with OR in the condition
    like
    <if condition="$bbuserinfo[userid]==0" || condition="$bbuserinfo[userid]==1">blabla</if>

    is that condition correct ?

  • #2
    Code:
    <if condition="condition1=='abc' OR condition2=='123'">stuff</if>

    Comment


    • #3
      Yes OR is the correct syntax

      Comment


      • #4
        thanks !

        Comment


        • #5
          I assume same applies for AND?

          Comment


          • #6
            Correct

            Comment


            • #7
              Double pipes also work for "OR".

              http://www.php.net/manual/en/languag...rs.logical.php

              Comment


              • #8
                This should be added int he vB3 Manual ... elementary vB3 php syntax rules ...

                Comment


                • #9
                  His initial idea for the syntax will work - but in what he pasted above, it wouldnt work

                  I just use OR because its easier to read, there were other corrections i made too

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X