I need to use a function in PHP that detect a delimiter of a file using 2 parameters:
the file handle and an array of the expected header values.
Can someone please help me in writing the function or using a similar existing function that use the header of the file and match it with the expected header values to detect the file delimiter without using an array of potential delimiters.
Thank you
Output
This first checks if the 1st character in
$lineis". If there is no", it substrings 1 character with a starting position of the length of$col1. If there are", it substrings 1 character with a starting position of the length of$col1+2 (for each of the")