if first element of array code example Example: array filter php get first object after array_filter use array_shift to get the first object