Or another solution:if (in_array($cat_id, array(2,3,4,5,10,8)))
{
include(ROOT_PATH.'some_file'.$cat_id.'.php');
}
Only usefull if you want to have independed "some_fileXX.php" for each category
and if you want to "share" one file for more then one category:$ids = array( //first number is category id, second number is file number
2 => 1,
3 => 2,
4 => 1,
5 => 3,
10 => 4,
8 => 2,
);
if (isset($ids[$cat_id]))
{
include(ROOT_PATH.'some_file'.$ids[$cat_id].'.php');
}