Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    January 18th, 2005
    Posts
    60
    How does everyone else seperate all the values in their feeds? I noticed most values are seperated by (",") without the brackets of course, but there are some numerical values which aren't surrounded by quotes & therefore I can't do an explode() in PHP to seperate all the values since they aren't all seperated by the same thing.

    Dunno why they made it this way... :/

  2. #2
    Full Member
    Join Date
    January 18th, 2005
    Location
    UK
    Posts
    273
    Try the fgetcsv function as it is specifically designed for CSV files.

    full documentation at
    www.php.net/fgetcsv

    I did a project way back in ASP/vbscript and I had to code my own CSV decode function, so it was real neat to find fgetcsv when I started to use PHP.

    Les

  3. #3
    Member
    Join Date
    January 18th, 2005
    Posts
    60
    Cheers for that!

  4. #4
    Member
    Join Date
    January 18th, 2005
    Posts
    145
    When you originally get the data feed have you checked to see whether or not the "," are in the original datafeed for all of the values?

    If they are, then you do not want to open the datafeed in Excel or any other spreadsheet, because the spreadsheet will strip the "'s away when it saves it, if the data in the value doesn't *REQUIRE* one (an example, if it has an embedded , in the values).

    I personally use Programmers File Editor for making the tweaks that I need to make to customize the datafeeds, it has a complete find and replace feature, and macroing capability, and doesn't change the datafeed format like a spreadsheet does.

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Overstock Wants me to Beg to Use their Datafeed
    By glittered in forum Commission Junction - CJ
    Replies: 2
    Last Post: April 28th, 2011, 08:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •