How can i compare a string with a pattern?
eg: i have in a table in a database with a column consisting of data about file types. My php script queries the data in that colmn and i am able to display it.
How can i make it that if the data is "image/*" [where the * is a wildcard (aint it?) can be anything (eg: image/jpeg)] to echo "Image File".
This is how i done it but not working as im not sure of the way it is supposed to be coded.
Code: Select all
if ($type == "Image/*")
echo "Image File";Anyone care to help out?