Re: Parse Question Using list()
| From: | cool@hosting4days.com | Date: | Fri, 02 Oct 2009 01:58:55 +0000 |
| Subject: | Re: Parse Question Using list() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298456@lists.php.net to get a copy of this message | ||
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 problem I'm exporting from another database (mac) to a csv file then a quick import to excel 2004 (mac) for some cleaning... before the excel import, some date fields look like "2009-9-29 11:21:37" = good for sql import but excel does an auto reformat to 9/29/2009 11:21:37 AM = not good for sql import Q: any way to turn this auto reformat off in excel and keep it the way I had it? (I saw nothing in pref's) Thanks, cool@hosting4days.com