Re: Removing link on the fly, but leave link text

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

 



On Tue, 2010-08-31 at 14:31 -0500, Karl DeSaulniers wrote:

> Hi,
> Say I have some text.
> 
> $text = 'You can logon here: <a href="http://website.com/shop/ 
> index.php?username='.$username.'">http://website.com/shop/index.php? 
> username='.$username.'</a>. This link will take you to your web  
> browser to login.'.$eol;
> 
> I want to be able to strip the "<a href="http://website.com/shop/ 
> index.php?username='.$username.'">" and </a>.
> Leaving just the http://website.com/shop/index.php?username='. 
> $username.' text, so it would end up like.
> 
> 
> $text = 'You can logon here: http://website.com/shop/index.php? 
> username='.$username.'. This link will take you to your web browser  
> to login.'.$eol;
> 
> I have tried MANY different ways and have no success.
> Can anyone help me?
> TIA
> 
> 
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
> 


strip_tags() will do the job here.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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