The expression can be any valid expression as long as it resolves
to an array.
The expression can be any valid expression as long as it resolves
to an integer.
public arrayElemAt ( mixed | self $array, mixed | self $index ) | ||
$array | mixed | self | |
$index | mixed | self |
/** * Returns the element at the specified array index. * * The <array> expression can be any valid expression as long as it resolves * to an array. * The <idx> expression can be any valid expression as long as it resolves * to an integer. * * @see https://docs.mongodb.org/manual/reference/operator/aggregation/arrayElemAt/ * @see Expr::arrayElemAt * @param mixed|Expr $array * @param mixed|Expr $index * @return self * * @since 1.3 */ public function arrayElemAt($array, $index) { $this->expr->arrayElemAt($array, $index); return $this; }