Reputation: 758
I am using multiple conditions in if, please see the code below;
if (strpos(serialize($row['pirority']),"P1")!==false &&
strpos(serialize($row['product']),"WFS")!==false)
{ $wfsp1++; }
If i add another condition it doesn't work;
if (strpos(serialize($row['pirority']),"P1")!==false &&
strpos(serialize($row['product']),"WFS")!==false) ||
strpos(serialize($row['product']),"DayEnd")!==false)
{ $wfsp1++; }
Can any one please guide me, what could be the reason?
Upvotes: 1
Views: 101
Reputation: 2401
You have syntax error.Try this
if (strpos(serialize($row['pirority']),"P1")!==false &&
strpos(serialize($row['product']),"WFS")!==false || //extra parenthesis was given
strpos(serialize($row['product']),"DayEnd")!==false)
{ $wfsp1++; }
Upvotes: 3