PHP to Ruby
Convert PHP code into Ruby!
-
pos
Posted on September 11th, 2009 No commentsThe pos() function is only an alias of current, which returns the key and value of the element the current array pointer is pointing to. However since Ruby doesn’t have an internal array pointer, this function does not have a Ruby equivalent.
For further information about pos(), see current().
-
current
Posted on September 8th, 2009 No commentsThe current() function in PHP returns the key and value of the element the current array pointer is pointing to. However in Ruby, there is no internal array pointer - as such Ruby doesn’t have an equivalent to PHP’s current() function.


