get first number of elements from array in php code example Example: array filter php get first object after array_filter use array_shift to get the first object