flattening an array without inbuilt function

join shbcf.ru