I often find myself doing quick checks like this:
if (!eregi(\'.php\', $fileName)) { $filename .= \'.php\'; }
But as eregi() was deprec
Good alternative for eregi() is preg_match() with i modifier:
eregi()
preg_match()
i
if (! preg_match('/.php/i',$fileName)) $filename.='.php';