PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
As I understand your purpose, if there are no files of the type passed to the function as an argument, the variable $files will not be set. So you could probably just test for whether the function returns a value, and if not, echo your message. I would not recommend trying to send the message from within the function.