From: Axel Etzold Date: 2008-07-07T23:38:49+09:00 Subject: Re: Multiply elements in array > Hi, > > This is what I have got: > > arr = ["abc", ["def", "def", "def"]] > > This is what I would like: > > arr_final = [["abc", "def"], ["abc", "def"], ["abc", "def"]] > > --------------------------------------------------- Dear Chris, arr = ["abc", ["def", "def", "def"]] arr_final=[] arr[1].collect{|x| arr_final<<[arr[0],x]} p arr_final Best regards, Axel -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx