Are you saying that it doesn't work at all? Are there any errors, that is where I start to get things working.
Anyways, The first thing that I noticed is your for loop. I was taught to never change the incrementing variable inside the for loop. So, I would use a while loop and get rid of "a" completey:
PHP Code:
while( NumberOfNamesFromFile < MAXNAMES && !feof(fHandle) )
{
//Get line
fgets(fHandle, name, 31);
trim(name)
//Work away comments and blank lines
if( name[0] == ';' || !name[0] )
{
//Line is not counted
continue;
}
copy(names[NumberOfNamesFromFile], 31, name)
NumberOfNamesFromFile++;
}
Also, I would always use braces, Always. It makes it much easier to read the code. I see some places that I can't tell if they are supposed to go with the if statement or not.
And, always make sure that all of your parentheses are closed.
__________________