How to set condition with multiple variables in PHP?

  • Thread starter Thread starter jibba.jabba
  • Start date Start date
J

jibba.jabba

Guest
I need to set the value of a variable ($cap) based on two different conditions:

If $x is greater than or equal to 10, then $cap should be set to 25. Otherwise, if (and only if) $x less than 10, then $cap should depend on $y.

If $y is 15, then $cap should be 15. If $y is 20, then $cap should be 20.

Any suggestions?
 
Back
Top