So make an array of "allowed" types:
$allowed = array('image/gif', 'image/jpg', 'image/png');
Then just see if the type is in the array:
if(!in_array($_FILES['file']['type'], $allowed))
And you can make it as robust as you'd like:
$allowed = array('Graphics Interchange Format (GIF)'=>'image/gif', 'Joint Photographic Experts Group (JPG)'=>'image/jpg', 'Portable Networks Graphic (PNG)'=>'image/png');
if(!in_array($_FILES['file']['type'], $allowed))
{
echo '<h3>File Type Error!!</h3>
<p>Please only utilize one of the following formats:</p>
<ul>';
foreach($allowed as $name=>$mime)
{
echo '<li>' . $name . '</li>';
}
echo '</ul>';
}