How can you access a column with an alias in a query result object in PHP?

When accessing a column with an alias in a query result object in PHP, you cannot directly use the alias name to fetch the column value. Instead, you need to use the original column name from the database table. This is because the alias is only available in the result set and not in the underlying data source. To access a column with an alias, you can either use the original column name or use the `fetch_assoc()` method to fetch the result as an associative array and then access the column using the alias.

// Assuming $result is the query result object
$row = $result->fetch_assoc();
$aliasColumnValue = $row['alias_name'];