|
|
|||||||
Hello all, Now, i have CSV file and it has 4 columns, I want to get the First column in a variable without the "," So, i tried these and could not get it. $x is the string i have read from the CSV file $aShareGroup[$Row] = Substr($x, 0, Instr($x, ",")) Need help !!! |
||||||||
|
|
|||||||
The CSV UDF will convert between a CSV string and an array. Download it and include it in your script. Then - $aRecord = CSV($Row) will convert your $Row record to an array. Each field from the CSV will be an element of $aRecord - 0 through 3. $aRecord[0] the first field, $aRecord[1] the second, and so on.. Thinking you can be 100% successful by trying to locate or find commas will get you into trouble. CSV is a specific format, and the CSV() function follows all rules to convert between an array and CSV string. Glenn |
||||||||
|
|
|||||||
Thanks Glenn, I am trying it now. will report how it goes. RJ |
||||||||
|
|
|||||||
Glenn, Perfect. Thanks Again RJ |