$sql = 'SELECT * FROM users, posts
WHERE posts.author_id = users.id';
$rows = R::getAll($sql);
$data = R::convertToBeans('posts',$rows);
foreach ($data as $element) {
echo $element->login . '<br/>' . $element->name . '<br/><br/>';
}
$hideEmailList = [ ];
foreach ($data as $element) {
if (!in_array($element->login, $hideEmailList)) {
$hideEmailList[] = $element->login;
echo $element->login . '<br/>' . $element->name . '<br/><br/>';
}
}