Jump to content
We've recently updated our Privacy Statement, available here ×

Conditional statements


icuucme

Recommended Posts

i want to edit an output string by a condition, i've seen various if statements but i;ve never seen any with an "and"

 

eg.

 

( $F{mail} == 1 && $P{mail}== 1 ? ("NOTHING") : $F{address2})

 

is that the correct format?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

the syntax is:

( condition ) ?  exp on true : exp on false

where condition can be a logical condition with logical operators...

so you can use &&, ||, ! etc and conbine more condition

 

($F{mail} == 1 && $P{mail}== 1)? "NOTHING" : $F{address2}

it is correct... but if $F{mail} and $P{mail} are in format different from integer, you must use other equals statement.

(pay attention to ( )  )

_________________________________________

if it works... give me KARMA points please!    : ) 
_________________________________________

listening:   MUSICA NUDA - Sacrifice

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...