added php array generation with new directory and spelling code