php relational operators : several values after !=
-
My php knowledge being limited, I need some help in order to customize the following bit of code, which is used in a sidebar that displays neighbouring posts of the same category.
if (($all_cats_of_post[$i]->cat_ID) != 8 )
The number 8 is the category ID that gets excluded from the sidebar listing. It works fine, but now I need to exclude not only ONE but SEVERAL categories, say cat_ID 10 and cat_ID 13.
How can I wrap several numbers inside this conditional statement? My search through PHP manual pages doesn’t bring up any example where a relational operator (==, !=) is followed by a series of optional values.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘php relational operators : several values after !=’ is closed to new replies.