How do I loop through a PHP array containing data returned from MySQL?

后端 未结 6 1856
野趣味
野趣味 2020-12-21 18:10

Ok I have a table with a few fields. One of the fields is username. There are many times where the username is the same, for example:

6条回答
  •  眼角桃花
    2020-12-21 18:21

    I like to separate the DB logic from the display. I generally put my results into an array that I can call within the HTML code. Purely personal preference; but here's how'd I'd approach the problem: (I'd take the $sql out of the error message in production)

    
    
    HTML CODE
    
    
    
    Study:  - 
    
    
    

提交回复
热议问题