How to select a particular node reference in a view programmatically I have two custom node types : catalog_item and category.

The catalog_item node has a cck node reference field that allow a user to select multiple category nodes. I want to be able to select a particular category from the node reference based on some php code. Is this possible with views?
Within the views API, you could use this field as an argument and then use PHP to supply the default argument.  This would then restrict the views to all catalog_items that have that specific category node referenced.

If you are doing this in code/a module/template/etc, you could do it also like this:

$nid=WHATEVERPHPCODEYOUWANT;
return views_embed_view(VIEWNAME,'default',$nid); // 'default' is the views display