switch case statement
Posted: Sun Mar 09, 2008 8:54 am
In the below switch case statement i want to check if value of $mime is "image/" and not be very specific to image/jpeg, It can be gif png or anything i am just concerned about "image/" part in the mime
The way it is stored in database is image/jpeg image/gif etc . What should i do?
The way it is stored in database is image/jpeg image/gif etc . What should i do?
Code: Select all
switch ($mime) {
case "image/jpeg":
echo '<img src="'.$row['link'].'" border="0" height="50" width="50" alt="' . $row['title'] .'" />';