More children were out of school in urban slums than in rural areas at both primary and secondary levels in Bangladesh.