Top "Arrays" questions

An array is an ordered linear data structure consisting of a collection of elements (values, variables, or references), each identified by one or more indexes.

Removing an element from an Array (Java)

Is there any fast (and nice looking) way to remove an element from an array in Java?

java arrays element
How to check whether an array is empty using PHP?

players will either be empty or a comma separated list (or a single value). What is the easiest way to …

php arrays
How to get the first element of an array?

How do you get the first element from an array like this: var ary = ['first', 'second', 'third', 'fourth', 'fifth']; I …

javascript jquery arrays
How can I add new array elements at the beginning of an array in Javascript?

I have a need to add or prepend elements at the beginning of an array. For example, if my array …

javascript arrays
Java String array: is there a size of method?

I come from a php background and in php, there is an array_size() function which tells you how many …

java arrays string
How to Sort Multi-dimensional Array by Value?

How can I sort this array by the value of the "order" key? Even though the values are currently sequential, …

php arrays sorting multidimensional-array
Get a random item from a JavaScript array

var items = Array(523, 3452, 334, 31, ..., 5346); How do I get random item from items?

javascript arrays random
How to read a text file into a list or an array with Python

I am trying to read the lines of a text file into a list or array in python. I just …

python arrays list text
Why is using "" for array iteration a bad idea?

I've been told not to use with arrays in JavaScript. Why not?

javascript arrays loops for-loop iteration
How to replace an item in an array with JavaScript?

Each item of this array is some number. var items = Array(523,3452,334,31, ...5346); How do I replace some number in with array …

javascript arrays