Quote:
Originally Posted by bl4h
wtf ? am I missing something here
Code:
if($this->product->productType == "dog" || $this->product->productType == "cat") { }
the two pipes between them means "OR".
|| = OR
&& = AND
I mean I wouldnt do it that way but that answer your question about and and or.
|
This is the correct way unless you are comparing more than a few product types (Cat, Dog, Horse, Pig) If so, use the switch statement.