Copy link to clipboard
Copied
ereg / eregi is no longer supported in 5.3+
need some help converting this.
<?php
$path = $_SERVER['REQUEST_URI'];
if(eregi('^/community/',$path) == 1) {
?>
jsteinmann wrote:
ereg / eregi is no longer supported in 5.3+
No, it's deprecated, which means it still works, but will be removed from the next major version.
if(eregi('^/community/',$path) == 1) {
if (preg_match('#^/community/#i', $path)) {
Copy link to clipboard
Copied
Have you tried preg_match with the i modifier ?
HTH
-Rob B
Copy link to clipboard
Copied
jsteinmann wrote:
ereg / eregi is no longer supported in 5.3+
No, it's deprecated, which means it still works, but will be removed from the next major version.
if(eregi('^/community/',$path) == 1) {
if (preg_match('#^/community/#i', $path)) {