I have to display link into my website like this :
$url = 'google.com';
<a href="<?php echo $url; ?>">Check it !</a>
What I don't understand now is that, the output href is not google.com but mydomain.com/google.com.
I don't know how to resolve this issue.
You need to append http:// before your url
Try below code:
$url = 'http://www.google.com';
<a href="<?php echo $url; ?>">Check it !</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With