IF AND OR

By: NATE Qureshi | Asked: 01/21/2024
NATE QureshiNATE Qureshi asked 5 months ago
I want to compare 4 values, like field ID, 10 20 30 40. I want to conditional check if 10<5 and 20<5 30<5 40>5, how I can create IF command that cane opera AND OR or what is the apprpriate way to make such IF condition in single line. Nate
2 Answers
Rob LeVineRob LeVine answered 5 months ago
It depends on the context in which you're doing it. Look at the "ternary operator" here. It may help.
NATE QureshiNATE Qureshi replied 5 months ago

can you at least give me an example regards to above fields ID's. I appriciate that.

S F answered 5 months ago
Hi Rob, In that link where multiple OR conditions is explained, I didn't see multiple AND conditions. Is that possible?
Rob LeVineRob LeVine replied 5 months ago

You can use any boolean operator you want. It's not special to Formidable. It's the same as any PHP implementation of the ternary operator.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right