I want to link a external url as follows:
$url='www.example.com';
$output ='<div class="button"><a href="'.$url.'"> View Profile</a></div>';
I run this wordpress web app at my localhost and base url is localhost/wordpress.
When I echo $output
it produce a link for view profile: localhost/wordpress/www.example.com
. But it should be www.facebook.com
What change shall i make?
http://
orhttps://
before your URL.