note 60097 deleted from control-structures.switch by tularis
| From: | tularis@php.net | Date: | Mon, 26 Dec 2005 23:07:00 +0000 |
| Subject: | note 60097 deleted from control-structures.switch by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-100755@lists.php.net to get a copy of this message | ||
Note Submitter: przemek ^at^ o2 ^dot^ pl
Reason: useless
----
You can pass more than two argumnts to case:
<?php
switch ($file['type']) //type is mime type
{
//////////////////////////////////////
case 'image/jpeg' || 'image/pjpeg': //action for jpeg and pjpeg
break;
//////////////////////////////////////
case 'image/gif': //action for gif
break;
//////////////////////////////////////
case 'image/png': //action for png
break;
}
?>