Re: [PHP] Parse question

2011-01-21 Thread Ron Piggott
On Jan 21, 2011, at 6: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 fo

Re: [PHP] Parse question

2011-01-21 Thread Nicholas Kell
On Jan 21, 2011, at 6: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

Re: [PHP] Parse question

2011-01-21 Thread Joshua Kehn
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 a

RE: [PHP] Parse question

2010-05-13 Thread Lawrance Shepstone
-Original Message- From: Ron Piggott [mailto:ron.pigg...@actsministries.org] Sent: 13 May 2010 06:34 AM To: PHP General Subject: [PHP] Parse question If $message_body contains: $message_body="You are subscribed using u...@domain. To update"; How do I capture just the e-mail address? R

Re: [PHP] Parse question

2010-05-13 Thread Cemal Eker
Check this out. http://www.regular-expressions.info/email.html --- “Talk is cheap. Show me the code” - Linus Torvalds On Thu, May 13, 2010 at 7:34 AM, Ron Piggott wrote: > > If $message_body contains: > > $message_body="You are subscribed using u...@domain. To update"; > > How do I capture jus

Re: [PHP] Parse Question Using list()

2009-10-02 Thread Gerardo Benitez
> > Use the tool that PHP provides for such problems. > > http://php.net/fgetcsv fgetcsv is very useful, here a example: $num fields in line $row: \n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "\n"; } } fclose($handle); ?> -- Gerardo Benitez

Re: [PHP] Parse Question Using list()

2009-10-01 Thread Jim Lucas
c...@hosting4days.com wrote: On Oct 1, 2009, at 5:02 PM, Ben Dunlap wrote: You could tackle this in a couple of different ways. Either split your string into an array first: $line = fgets($handle); $columns = explode(",", trim($line)); Thanks Ben - the explode() command worked great! Use

Re: [PHP] Parse Question Using list()

2009-10-01 Thread c...@hosting4days.com
On Oct 1, 2009, at 5:02 PM, Ben Dunlap wrote: You could tackle this in a couple of different ways. Either split your string into an array first: $line = fgets($handle); $columns = explode(",", trim($line)); Thanks Ben - the explode() command worked great! - Now a bit of another pro

Re: [PHP] Parse Question Using list()

2009-10-01 Thread Ben Dunlap
> $line = fgets($handle); > > list($col1, $col2, $col3) = $line; [8<] > echo "c1 is $col1 and c2 is $col2 and c3 is $col3".''; // this shows > just 1st char of each field That's odd, I would have expected $col1, $col2, and $col3 to be NULL. That's what I get when I try to assign a string to list()