<?php $array = ['one.php', 'two.txt']; $found = false; foreach ($array as $filename) { if (str_ends_with($filename, '.txt')) { $found = true; break; } } var_export($found);
You have javascript disabled. You will not be able to edit any code.