filename, $search) !== false) { $results[] = $config["url"] . "/" . $upload->filename; } } // Return results if (empty($results)) { echo "No results found\n"; } else { var_dump($results);die(); } } catch (Exception $e) { var_dump($e->getMessage());die(); }