Can I call drupal_add_css from a block? I'm building an HTML table in a php filter in a block. Can I/is it OK if I call drupal_add_css() from the block php?

Thanks.
Although probably ok, rather than using the PHP filter, you may be interested in using


hook_block_info
hook_block_view 


To define your blocks instead. Perfectly fine to use drupal_add_css there.

Eg :

&lt;?php
drupal_add_css(drupal_get_path('module', 'custom') . '/css/custom.css', array('group' =&gt; CSS_DEFAULT, 'every_page' =&gt; TRUE));
?&gt;