Is it possible to limit the number of members in an array, like LIMIT in MySQL? For instance, if I have $array with x members, and I only want to return the first 50 of them, how do I do that?
Should I use a combination of count() and array_slice(), or is there a simpler way?
Using array_slice should do the trick.