Dynamic fetch assoc depending on the size

I have a question about making a fetch_assoc more of a dynamic.

$i = 0; echo "<tr>"; while(mysqli_fetch_assoc($res)) { $i++; echo "<td>". $row["stuff"] ."</td>"; if($i == 3) { echo "</tr><tr>"; $i = 0; } } echo "</tr>";

I use this way to fetch data from the database and display them on the screen. But this way
is not really good because it will always show 3 td's per tr.

The question is: how can I make the fetch_assoc dynamic? Like it depends on the user's screen
size? If the user has a FHD 1080p screen he'll see more td's and if the user has a lower screen
the fetch_assoc will change.

Category:javascript Views:3 Time:2018-04-14

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.081 (s). 11 q(s)