In PHP, how can I check if the current page has www in the url or not?
E.g if the user is on http://www.example.com/something , how can I find that there\'s www in t
Do you already know the url? Then take this:
Otherwise, take
strpos($_SERVER['HTTP_HOST'], "www.") === 0