An idea

From: Date: Tue, 19 Jun 2001 22:48:03 +0000
Subject: An idea
Groups: php.general 
Request: Send a blank email to php-general+get-54431@lists.php.net to get a copy of this message
Humor me, how useful would a Regex switch statement be? Like: ereg_switch($filename) { case "/\.jpg$/": echo "JPEG Image"; break; case "/\.gif$/"; echo "GIF Image"; break; case "/\.zip$/": echo "Compressed File"; break; default: echo "Unkown File Type"; break; } That is just an example of an application of such, I have other applications that I would like to use it for, but that serves the best example. I would love to get started on a module project for something like this, as using IF blocks with PREG_MATCH become tedious and inefficient. If you know of such a module or would know how to get started, please repsond with your ideas/input. Chris "TunkeyMicket" Watford -------------------------------------------- TunkeyMicket Productions www.tunkeymicket.com

« previous php.general (#54431) next »