Re: Parse question

From: Date: Sat, 22 Jan 2011 00:55:06 +0000
Subject: Re: Parse question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310968@lists.php.net to get a copy of this message
On Jan 21, 2011, at 7:52 PM, Ron Piggott wrote: > > Would someone write me a syntax so all the web site addresses in $data turn into links > > $data = “Visit our web site http://www.site.com, > http://www.secondsite.org and http://www.thirdsite.info.”; > > My desired results for what I am asking for help turn $data into: > > $output =“Visit our web site <a > href=”http://www.site.com”>http://www.site.com</a>, > <a > href=”http://www.secondsite.org”>http://www.secondsite.org</a> > and <a > href=”http://www.thirdsite.info”>http://www.thirdsite.info</a>.”; > > Please make provision for .net web sites as well. > > Ron I would check for url regex patterns and build a solution off of that. Regards, -Josh ____________________________________ Joshua Kehn | Josh.Kehn@gmail.com http://joshuakehn.com

« previous php.general (#310968) next »