candycanes Posted July 9, 2010 Posted July 9, 2010 Hi There, I'm modifying a script written by someone else and am having trouble with it. Basically it's a feed generation script and it all works fine except the last few fields are bundled into one column in the csv. The products_date_added column contains all the following data when viewed in excel: 0000-00-00 00:00:00,0,0,0,null,null 1342" Evidently it's putting the newline delimiter as part of the field content, in actual fact 1342 is the product number of the next record in the db. $csv .= '"'.$row['products_id'].'","'.$row['products_image'].'",VAT17_5,"'.$row['products_date_added'].",0,0,0,null,null\n"; Any ideas? I've tried endless permutations of double and single quotes! Frustratingly I've copied the exact format of a different feed, which works fine. Can't understand how it works ok in one and not the other. This is ok code: $csv .= '"'.$row['products_model'].'","'.$row['products_date_added'].'","'.$row['products_quantity'].'",,,,,,,,,'.$row['products_status'].",EOREOR\n"; Thanks in advance!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.