I agree with tally, although his code seems inefficient on the following part:
You first get all elements, store them in a string, separated by , and then strtok that string on that very same ,PHP Code:line = "";
for( pos = 0; pos < elems; pos++ )
{
line = line + fgetarg( file, pos );
if( pos < elems - 1 )
line = line + ",";
}
array = strtok( line, "," );
You can do that directly by:
-some guy who actually read the codePHP Code:array = [];
for(pos = 0; pos < elems; pos++)
array[pos] = fgetarg(file, pos);



Reply With Quote