how can I exclude more files like branding.php? For example branding.php, about.php, contact.php.
$pages = preg_grep('/branding\.php/', glob("*.php"), PREG_GREP_INVERT);
Thx.
how can I exclude more files like branding.php? For example branding.php, about.php, contact.php.
$pages = preg_grep('/branding\.php/', glob("*.php"), PREG_GREP_INVERT);
Thx.
Copyright © 2021 Jogjafile Inc.
 
                        
Use alternative in the regex:
Where
\b: word boundary to avoid matchingabrandingorabc123about...(?:branding|about|contact): non capture group that matchbrandingORaboutORcontact(you may add more files)