Associative Arrays in Ruby

Unlike PHP which conflates arrays and hashes, in Ruby (and practically every other language) they’re a separate thing.

http://ruby-doc.org/core/classes/Hash.html

In your case it’d be:

a = {'Peter' => 32, 'Quagmire' => 'asdas'}

There are several freely available introductory books on ruby and online simulators etc.

http://www.ruby-doc.org/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)