programmatically get bundles from field collection?
What about:

$bundle = db_query("SELECT bundle, entity_type FROM field_config_instance WHERE field_name = :field_name", array(':field_name' -&gt; $field_name))-&gt;fetchAll();


If you know the enity_type then you can use field_info_instances().