Changed if( and foreach( to if ( and foreach ( in line with the coding standards.