Source Code:
(back to article)
<?php $pattern = "*.txt"; $string = "myfile.txt"; if (fnmatch($pattern, $string)) { echo "The string matches the pattern!"; } else { echo "The string doesn't match the pattern!"; }
Result:
Report an issue