Any idea why this line of code: $image['format'] = strtolower(preg_replace('/^.*?//', '', $image['mime'])); Produces this error: Warning: preg_replace() [function.preg-replace]: Unknown modifier '/' Thanks for the help.
It looks like you want the pattern to match anything up to a forward slash. Since that is the pattern delimiter, you need to escape it or use a different delimiter. E.g. /^.*?\// or ~^.*?/~
Salathe Software Developer and PHP Documentation Team.
Forum Rules
Bookmarks