You are here: Shorten this line? « PHP Programming Language « IT news, forums, messages
Shorten this line?

Posted by UKuser on 05/16/07 08:44

Hi,

Is there a way to shorten this line

if ((ereg(".jpg",$filename))||(ereg(".eps",$filename))||(ereg(".tif",
$filename))||(ereg(".tiff",$filename))||(ereg(".jpeg",$filename))||
(ereg(".ai",$filename))) {

I've tried ereg(array("1","2" etc),$filename) but it won't work. A bit
of context - I'm trying to filter files of certain types.

Thanks

A

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация