Open utterances-bot opened 2 years ago
In this article, you will learn how to get domain name from a URL in PHP. Let’s say you have a string variable named ‘a’ that has the value of
https://codesource.io/how-to-get-domain-name-from-url-in-php/
Why is
$a = 'https://codesource.io/javascript-design-patterns/';
wrong?
Parse error: syntax error, unexpected 'https' (T_STRING) in ..\test.php on line 1
How to Get Domain Name From URL in PHP
In this article, you will learn how to get domain name from a URL in PHP. Let’s say you have a string variable named ‘a’ that has the value of
https://codesource.io/how-to-get-domain-name-from-url-in-php/