I have a line in php like this:
if ($line[3]<=12)
And now I need to add new condition while keeping the old one. Something like this, but is not working:
if ($line[3]<=12|$line[10]<1)
Could you please help? Thank you so much!
I have a line in php like this:
if ($line[3]<=12)
And now I need to add new condition while keeping the old one. Something like this, but is not working:
if ($line[3]<=12|$line[10]<1)
Could you please help? Thank you so much!
Very basic question dude. Have a look on logical operators in PHP.
If you want ONE of the conditions to be valid:
if ($line[3]<=12 || $line[10]<1)
If both conditions must be valid:
if ($line[3]<=12 && $line[10]<1)
You need to add the correct logical operator:
if ($line[3] <= 12 || $line[10] < 1)