Ok, to reply to myself:
Finally, I decided to not to do this with PHP but with JS instead.
So here is code which is works perfectly for me:
<script>
window.onload = function() {
var fastInternet = document.getElementById("catid");
for ( var i = 0; i < fastInternet.options.length; i++) {
var value = fastInternet.options[i].value;
if(value != '149' && value != '150' && value != '151'){
//need to hide this
fastInternet.options[i].setAttribute("disabled", "disabled");
}
//if you need it
else if(value == 'myValue' || value == 'myValue'){
fastInternet.options[i].setAttribute("disabled", "disabled");
}
}
//hide disabled fo IE
$K2('#catid option[disabled="disabled"]').remove();
};
Where:
fastInternet = just variable
catid = name of "select" tag, eg. in K2 "<select name="catid" id="catid">"
149,150,151 = id's of categories which I WANT to use
"$K2('#catid option[disabled="disabled"]').remove();" = hide disabled options in IE,it works without this for FF
With combination of Comparison Operators (eg. instead != you can use ==) you can get probably situation which is what you want.
This JS code is not mine (I wish I know JS that much! ;) ) , it is from here:
JS code source
Line for IE I picked up somewhere on this forum.