Jump to content

What does this code do?

Go to solution Solved by RockSolid1106,
13 minutes ago, Emil_Loenneberg SE said:

Hi. I'm having a hard time understanding what this code does.

Well I think I'm back again 🙂

 

while($row = mysqli_fetch_assoc($result))

This part will loop through the data from DB row by row, in the form of an array. $result seems to be having data previously fetched from a DB.

 

This part:

image.png.b0f6b2b77bdac80e91f6f47bbbb87006.png

will take the first row in the information from the DB, and then uses "<th>" to format it as 'Table Header', I think it is something like making the first row bold

image.png.5c92cc62ffb54d9598afc915d2aabbea.png

This will essentially combine the rest of the data from the DB into a table. The tabular data is stored into the variable 'table'.

image.thumb.png.997707245cca9a3eb19a74a85627f7f9.png

This will check if the data from the DB is empty. If it is, It will throw a table which has "No results" as the output. Else, it will output the table.

 

TL;DR, just converting the data from a Database into a tabular format.

 

Hope this helps!

13 minutes ago, Emil_Loenneberg SE said:

Hi. I'm having a hard time understanding what this code does.

Well I think I'm back again 🙂

 

while($row = mysqli_fetch_assoc($result))

This part will loop through the data from DB row by row, in the form of an array. $result seems to be having data previously fetched from a DB.

 

This part:

image.png.b0f6b2b77bdac80e91f6f47bbbb87006.png

will take the first row in the information from the DB, and then uses "<th>" to format it as 'Table Header', I think it is something like making the first row bold

image.png.5c92cc62ffb54d9598afc915d2aabbea.png

This will essentially combine the rest of the data from the DB into a table. The tabular data is stored into the variable 'table'.

image.thumb.png.997707245cca9a3eb19a74a85627f7f9.png

This will check if the data from the DB is empty. If it is, It will throw a table which has "No results" as the output. Else, it will output the table.

 

TL;DR, just converting the data from a Database into a tabular format.

 

Hope this helps!

On 4/5/2024 at 10:13 PM, LAwLz said:

I am getting pretty fucking sick and tired of the "watch something else" responses. It's such a cop out answer because you could say that about basically anything, and it doesn't address the actual complaints. People use it as some kind of card they pull when they can't actually respond to the criticism raised but they still feel like they need to defend some company/person. If you don't like this thread then stop reading it. See how stupid it is? It's basically like telling someone "shut the fuck up". It's not a clever responsive, it doesn't address anything said, and it is rude. 

 ^

 

bruh switch to dark mode its at the bottom of this page

VPN Server Guide

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×