Re: [PHP] help with \n\r in strings



Angelo Zanetti wrote:
So is there a way to test for \r\n? or what else can I use to delimit these two values (last column of row and first column of next row)?

Since it's coming from a file, you might as well just read it with file(), which will split each line into an array automatically. If it's a CSV file, then fgetcsv() helps you out even more.

Arpad
.



Relevant Pages

  • Re: help with in strings
    ... Angelo Zanetti wrote: ... I receive a text file with a whole bunch of strings. ... or what else can I use to delimit these two values (last column of row and first column of next row)? ...
    (php.general)
  • Calculating Column Averages from a CSV File
    ... I am trying to calculate column averages (excluding 0's) for all the ... columns in a CSV file except the first column. ... perl code, perl is calculating the 2nd column's average 9 times rather ...
    (perl.beginners)
  • Re: Dataset not Clearing
    ... t> I am trying to clear my dataset each time I read a new csv file but ... t> foreach (string strFile in strFiles) ... t> It should be what is in the first row, first column of the table, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Import CSV file
    ... When I try to import a CSV file (downloaded from Etrade), ... in the first column with the commas intact. ... I tried saving it as an Excel CSV file and re-importing. ...
    (microsoft.public.mac.office.excel)
  • Re: When I open a *.CSV file, text appear in the first column? What c.
    ... When I open in Excel 2003 a CSV file, the text appear in the first column. ... Prev by Date: ...
    (microsoft.public.excel.setup)