move array echo to outside the scope