Very new to PHP, but I have this code
$url = 'http://example.com/en-us/about-us';
if ($url contains 'en-us') {
replace 'en';
}
does anyone know how I would get this to work.
Basically if the URL contains en-us
replace the url with en
Thanks