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 asking

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 asking

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

[PHP] Parse question

2010-05-13 Thread Ron Piggott
If $message_body contains: $message_body=You are subscribed using u...@domain. To update; How do I capture just the e-mail address? Ron

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 ron.pigg...@actsministries.org wrote: If $message_body contains: $message_body=You are subscribed using u...@domain. To

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

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: ?php $row = 1; /* load file*/ $handle = fopen(log.csv, r); /* read line by line */ while (($data = fgetcsv($handle, 1000, ,)) !== FALSE) { $num = count($data); echo p

[PHP] Parse Question Using list()

2009-10-01 Thread c...@hosting4days.com
newbie import csv question file is like: stuff1,stuff2,stuff3 stuff1,stuff2,stuff3 stuff1,stuff2,stuff3 stuff1,stuff2,stuff3 etc. Problem: when I try to parse out the 3 fields and display them using list() it just gets just 1st char of each field ... Q: How do I get it to set $col1 - 2

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.'br'; // 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(). It

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

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