User Profile
Collapse
-
I want it to be done using something like ereg_replace. Spliting the string will not be easy when there many urls in string. So I want they be replaced easily please help. -
[PHP]
$string="The world is bright. Check this URL: http://bytes.com/forum/newreply.php?do =newreply&p=318 2222";
[/PHP]
Now I want to convert URL in $string into link. But replacement must be done in this way:
[HTML]
The world is bright. Check this URL: <a href="http://bytes.com/forum/newreply.php?do =newreply&p=318 2222">http://bytes.com/forum/newreply.php?.. ....</a>...Leave a comment:
-
WorldBank started a topic How to convert URLs in string into Links and Edit the URL while displaying?in PHPHow to convert URLs in string into Links and Edit the URL while displaying?
I don't have good knowledge in PHP. I need help with:
Let's suppose a string:
"Why is sky blue? http:www.whyist heskyblue.com/whyisitsoblue/cansomebodymake _it_red"
Ok now for this string, I want to conver the URL mentioned in to link and at a same time I want the URL (since is quite long) be displayed as:
"Why is sky blue? http:www.whyist heskyblue.com/whyisitsob..... ."...
No activity results to display
Show More
Leave a comment: