The $rows variable contains the data I want, but it does not enter the foreach loop. I checked the $rows variable using var_dump() and it contains data. There is no error/warning log either.
<?php
$filter = ['email' => 'example@gmail.com', 'password' => '123123'];
$options = [];
$query = new MongoDB\Driver\Query($filter, $options);
$rows = $conn->executeQuery('my_db.my_collection', $query);
foreach ($rows as $row_info) {
if ($row_info != null) { //if there is such data
$row_info = json_decode(json_encode($row_info), true);
}
}
?>