Why does this for loop work with each condition on their own, but together the first condition doesn't matter?
for ($j = 0; $j < 5 or $j < $synCount; $j++)
I only want the loop run five times
or
if synCount is less than this.
You probably mean "$j
under 5 and $j
under $sysCount
", or:
$j < min(5, $sysCount)
very simple
$j < min(5, $sysCount)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With