true will be evaluated at 1 and false at 0:
$qty = (first condition) + (second condition) + (third condition);
The value of $qty will contain the number of iterations desired.
So, you execute your command, for example:
for ($i=0; $i<$qty; $i++) { //Your line of code you want to execute, for example: echo $i, "\n"; }
There are no explicit if-else expressions.
source share