arrayElemAt() public méthode

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.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/arrayElemAt/
Since: 1.3
public arrayElemAt ( mixed | self $array, mixed | self $index )
$array mixed | self
$index mixed | self
Exemple #1
0
 /**
  * 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;
 }