I wrote a function that should return all users in the database. It's printing the array, but it's only printing one result. Why is it doing this? I surrounded it in a while loop and put a limit in my query...
Code:
function getAllUsers() {
global $PDO;
$stm = $PDO->prepare("SELECT * FROM `users` ORDER BY `bid` DESC LIMIT 15");
$stm->execute();
while($Array = $stm->fetch()) {
return print_r($Array);
}
}