I want to get URL only from an i have tried a thing, But it works with Simple files When i place code into my actual wordpress page, It givess error..
<?php
$string = "this is my friend's website <a href=http://facebook.com/baberzaman > I think it is coll</a>";
$url = explode(' ',strstr($string,'http://'))[0];
?>
<br><br>
<?php echo $url;
?>
It works good. but when i put it in wordpress. It give some '[' error in this line..
$url = explode(' ',strstr($string,'http://'))[0];
?>
I hope to get help soon
Thanks..