hi,
 I'm getting value like {"1stjan1"=>"01/01/2009", 
"10thjan1"=>"10/01/2009", "1stjan2"=>"01/01/2009",and so}
for the code

array3 = {}
array1.each_with_index do |x, i|
  array3[x] = array2[i]
end

I need to merge the value but the key(date) should be same.

Thanks.

anton effendi wrote:
> Haii...
> I will try help u.
> array3 =
> ['01/01/2009'=>'1stjan1-stjan2-1stjan3','10/01/2009'=>'10thjan1-10thjan2']
> -> *this is not array.. this is hash..*
> 
> The code is
> array3 = {}
> array1.each_with_index do |x, i|
>   array3[x] = array2[i]
> end
> 
> 
> may be it can help u..
> thank you..
> 
> fyi ==> array1.length == array2.length   --> this is rule for that 
> case....(
> *MUST*)
> 
> 
> 
> On Tue, Jan 27, 2009 at 2:13 PM, Shankar Ganesh <
> rails-mailing-l...@andreas-s.net> wrote:
> 
>>   array3 =
>> ['01/01/2009'=>'1stjan1-1stjan2-1stjan3','10/01/2009'=>'10thjan1-10thjan2']
>>
>>  Thanks in Advance.
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>> >
>>
> 
> 
> --
> Wu You Duan

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to