Skip to content
Advertisement

Php flip the echo result

I confused the method to flip the place of the echo result, below is my code

JavaScript

As you see in the “while“, it’s echo the first result and the second result below it, but I want the first result in below of the second result, can anyone tell me the method to do it?

Advertisement

Answer

sorry if i answer my own question because i found it out myself

use mysqli_num_rows or often called mysqli count

http://php.net/manual/en/mysqli-result.num-rows.php

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement