How to check if View is empty with PHP I'm using Simplenews Scheduler to automatically send a digest of new nodes, by inserting a views token into Body field of the newsletter. 

I need to prevent sending the newsletter if the View in question is empty (triggers No results). 

Simplenews Scheduler allows for PHP evaluation (see at the bottom of the screenshot): 



What do I need to enter there to ensure no new newsletter is created and sent if a certain view (with certain exposed filter or contextual filters options) has no results?
I believe this will do:

!empty(views_get_view_result('your_views_machine_name','your_display_id'));


If you need to pass arguments, you can pass them as individual strings after the display id. See the API documentation. I'm not sure if you can pass exposed filter arguments, though (the above would work fine for contextual filter arguments).