How to print a while() loop in PDO [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a database table with 4 columns: Name , Comment , Star , Status . I want to display all the records of the table on a single page. Here is my query: $sth = $this->db->prepare("SELECT * FROM comment WHERE status = 1"); $sth->setFetchMode(PDO::FETCH_ASSOC); $sth->execute(); $reviews = array(); while($row =