How can mysqli_fetch_assoc() be utilized to extract values from a database query result in PHP?
When using mysqli_fetch_assoc(), you can retrieve values from a database query result in PHP by fetching the next row from the result set and returning it as an associative array. This function fetches a single row of data from the result set represented by the mysqli_result object and returns it as an associative array where the keys represent the column names.
// Assuming $result is the mysqli_result object containing the query result
while ($row = mysqli_fetch_assoc($result)) {
// Access values using column names as keys
echo $row['column_name'];
}