PHP, for all its warts, is pretty good on this count. There\'s no difference between an array and a hash (maybe I\'m naive, but this seems obviously right to me), and to ite
In Ruby 2.1, each_with_index method is removed. Instead you can use each_index
Example:
a = [ "a", "b", "c" ] a.each_index {|x| print x, " -- " }
produces:
0 -- 1 -- 2 --