&'s in conditionals?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • etones
    Senior Member
    • Sep 2000
    • 666

    &'s in conditionals?

    Hi all, can we use ands in conditionals?

    i.e..

    <if condition="$name=="hello" AND $age > 90">
    ...
    </if>

    Cheers all
    Taz
    http://www.e-tones.co.uk - The best site on the net for mobile phones.
  • MrNase
    Senior Member
    • Jun 2003
    • 3575
    • 3.8.x

    #2
    As far as i know, yes
    That's the end of that!

    Comment

    • pablo
      Senior Member
      • Apr 2002
      • 592
      • 3.8.x

      #3
      why not && ?
      My Sites :

      Comment

      • etones
        Senior Member
        • Sep 2000
        • 666

        #4
        I thought the PHP standard for 'and' was 'AND', && is c/java syntax, i've never actually tried it with PHP!!

        Anywho, thanks for the heads up...

        Goes to recode some conditionals

        Cheers All
        Taz
        http://www.e-tones.co.uk - The best site on the net for mobile phones.

        Comment

        • Orfejs
          Senior Member
          • Feb 2003
          • 245

          #5
          vb3 goes syntax crazy ...

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            Originally posted by etones
            Hi all, can we use ands in conditionals?

            i.e..

            <if condition="$name=="hello" AND $age > 90">
            ...
            </if>

            Cheers all
            Taz
            Any PHP logical operators will work - http://www.php.net/manual/en/languag...rs.logical.php

            And don't use double quotes around 'hello', use single quotes.

            Comment

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