Added PHP_EOL at enof loop to remove repetitive \n breaks