From: Saeed Bhuta Date: 2010-04-22T22:39:10+09:00 Subject: Re: If-Else within a loop going through array elements... > Replace "else if" with "elsif", i.e. > > elsif i == 2 > puts "if statement is working for second condition" > serviceDetailsHash["direction"] = directionArray[1].inner_html > end > > Hope this helps, > > Lyle Just spotted my mistake, I just removed the space between else if instead of removing the 'e' too in the else. Thanks for your help Lyle. -- Posted via http://www.ruby-forum.com/.