Try this:

$pattern = array(
    "/<a [^>]/",
    "/</a>/"
);

preg_replace($pattern, "", $text);

-- 
João Cândido de Souza Neto

"Karl DeSaulniers" <k...@designdrumm.com> escreveu na mensagem 
news:007bc8e1-b2c8-4dd5-9d18-eb07b0d55...@designdrumm.com...
> 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
>
> 



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

Reply via email to