I have some coding that was done years ago for me using eregi. I know that I need to change it to preg_match but have no idea how to do this.
the code is:
if (eregi("\.jpg|\.gif|\.png", $f))
array_push($files, $path.$f);
Any help would be greatly appreciated
thanks
You should be able to use
preg_matchhere with theicase insensitive flag:Note that the
eregifunction was deprecated in PHP 5.3.0 and removed in 7.0.0, see the documentation. It is time to upgrade to a current version of PHP.