The mysqli_fetch_fields() function is the fastest way to get a complete overview of your query
structure. With a single call, you get an array containing objects with information about every single column in
the result set.
Why is this better than the standard fetch_field function? With the standard function, you have
to manually run a while loop, but here you get all the data in a single step. This is ideal when you
want to, for example, automatically display a table header with column names at the top of a webpage. Test it at
home like this:
foreach loop is used to quickly iterate through all column properties.