You clicked this and thought it was the most stupidest question you actually ever saw... No, it's more complex than simple PHP. Here's what I mean. When you use SQL and PHP together, there is a function called mysqli_fetch_object() in which returns the SQL query result rows as objects in which you can then get the columns by their names. Example:
So what I want to know how to do is how to make my own version of that. How do they access the columns like that when they don't have them set until the query?
Basically I need to know the code between in which mysqli_fetch_object() function runs. Thanks!
Code:
while ($object = mysqli_fetch_object($result)) {
echo $object->id;
echo $object->username;
echo $object->aUselessColumn;
}
Basically I need to know the code between in which mysqli_fetch_object() function runs. Thanks!
