Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1c79396097
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (11 sloc) 0.64 kb

Array Functions

There are a few fundamental differences when working with arrays in PHP and Ruby. PHP uses the versatile array data type to handle both numerically ordered collections and associative key/value pair collections. Ruby uses two different objects -- Array for ordered collections, and Hash for associative style collections.

In many of the array function examples we interchangeably use both Ruby arrays and hashes to display the closest Ruby equivalent.

It is important to note that hashes in Ruby are unordered collections. If the order of elements is important to the operation, you will need to use Ruby arrays.

Something went wrong with that request. Please try again.