Re: Converting URL's to hyperlinks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----- 
From: "John Meyer" <johnmeyer@xxxxxxxxxxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Friday, August 28, 2009 1:56 AM
Subject:  Converting URL's to hyperlinks.


> What sort of function would I need if I wanted to convert those URLs 
> from plain jane text?
> 

You should encode the url before printing as usual way

$url = htmlentities('http://www.mysite.com/index.php?act=1&t=10');

echo "<a href=\"{$url}\">mysite</a>";


- Eric

> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux