I want to say If navtype=subproduct and $filter has a value, then do this.
Is the code below correct?
if ($navtype=="subproduct") AND ($filter) {
if ( $navtype=="subproduct" && $filter ) {
&& is used for AND I guess you can use something else, too. But ...
Thats great thanks.
What about if I want to say:
If navtype=subproduct and $filter does NOT have a value
??
// there are several options to test // ! means NOT if (!isset( $x )) // variable is not defined if (!$x ) // is not set, or isset AND has zero value (empty string or 0 ) if (empty( $x )) //is somthing similiar if ( $navtype=="subproduct" && !$filter ) // || is used for OR if ( $navtype=="subproduct" || $filter )
There is a chapter at http://php.net about this, but link I do not know
I used !$variable. Thanks.