<?php
    $user = new User($conn);
    $allUsers = json_decode($user->getAllUsers());
    for ($o = 0; $o < count($allUsers); $o++){
?>    
        <li class="collection-item avatar">
            <img src="<?php print $allUsers[$o]->avatar ?>" alt="<?php print $allUsers[$o]->username ?>" class="circle">
            <div class="col s12 l4">
                <a href="users.php?id=<?php print $allUsers[$o]->id ?>"><?php print $allUsers[$o]->username ?></a>
            </div>
        </li>

<?php
    }
?>