*
* \param string $directory The directory to search for files.
* \param mixed $extensions An array of strings, the extensions to look for.
* \return A list of files that have the appropriate extension.
*/
function get_files_by_extension($directory, $extensions)
{
if (is_string($extensions))
$extensions = array($extensions);
$files = array();