I want to check if the current $uri_string
matches any of these patterns
$uri_string = 'project/details/1258';
$uri_patterns = [
'project/foo/',
'project/bizz/',
];
foreach($uri_patterns as $pattern) {
if(preg_match('/' . $pattern. '/i', $uri_string) == 1) {
echo 'Is a match!';
}
}
so if at some point the $uri_string = 'project/foo/123/some-other-params';
then this sould match the 'project/foo/'
pattern. How can I do this?