Added functions for table header and checks in table frontend/php.
Cleaned up for loops to start at 0 and exclude . and .. files frontend/php.