Very new to PHP, but I have this code does anyone know how I would get this to work. Basically if the URL contains en-us replace the url with en Thanks Answer I hope this could be some help for you
Tag: contains
How do I check if a string contains a specific word?
This question’s answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. Consider: Suppose I have the code above, what is the correct way to write the statement if ($a contains ‘are’)? Answer Now with PHP 8 you can do this using str_contains: RFC Before PHP 8 You can