⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

mysqli_fetch_field()

Have you ever wondered how PHP knows whether a piece of data in the database is a number or text? The mysqli_fetch_field() function is like an X-ray for your table. It does not return the content (e.g., the name "apple"), but tells you everything about the slot where this data is stored.

EXAMPLE
RESULT
The result will be displayed here...

Why would you need this? Imagine you are building an automated system that needs to draw a table on its own and adjust column widths based on their length in the database. With this function, you get an object containing all these technical details. Look at everything we can find out: