php – How can I return all the users in a row and not just one?

How can I make it show all the usernames and the amount they carry? So far, only the first user returns and the others do not …

getTimestamp ();

$ today = new DateTime (date (& # 39; Y-m-d & # 39;));
$ today = $ today-> getTimestamp ();

$ link = new PDO (& # 39; mysql: host = localhost; dbname = db & # 39 ;, root & # 39 ;, & # 39; 12345678 & # 39;);
foreach ($ link-> query (& # 39; SELECT * from members & # 39;) as $ row) {
$ user_id = "". $ row['id']. "north";
$ username = & # 39; & # 39 ;. $ row['username']. "north";

foreach ($ link-> query ("SELECT COUNT (*) total FROM ptsu_requests WHERE status = & # 39; Completed & # 39; AND date> = $ yesterday AND date <= $ today AND user_id =". $ user_id) as $ row) {

$ row1 = & # 39; & # 39 ;. $ row['total'] . "
"; echo $ row1; setRankings function ($ positions) { $ rankings = array (); arsort ($ classifications); $ rank = 1; $ tie_rank = 0; $ prev_score = -1; foreach ($ positions as $ name => $ score) { if ($ score! = $ prev_score) {// this score is not a tie $ account = 0; $ prev_score = $ score; $ rankings[$name] = matrix (& # 39; score & # 39; => $ score, & # 39; rank & # 39; => $ rank); } else {// this score is a draw $ prev_score = $ score; yes ($ account ++ == 0) { $ tie_rank = $ rank - 1; } $ rankings[$name] = array (& # 39; score & # 39; => $ score, & # 39; rank & # 39; => $ tie_rank); } $ range ++; } returns $ rankings; } // ======================== ========================================================================= === // try the previous function $ scores = array ( $ username => $ row1 ); $ ratedScores = setRankings ($ scores); // show player ratings foreach ($ ratedScores as $ player => $ data) { echo $ player. & # 39; - & # 39; $ data['score'] . & # 39; - & # 39; $ data['rank'] . & # 39;
& # 39 ;; } } } ?>