Skip to content
Advertisement

php variable contains string and replace

Very new to PHP, but I have this code

JavaScript

does anyone know how I would get this to work.

Basically if the URL contains en-us replace the url with en

Thanks

Advertisement

Answer

JavaScript

I hope this could be some help for you

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement