PHP mysqli_field_count() Function

PHP mysqli_field_count() function returns the number of columns for the most recent query.

Syntax

mysqli_field_count() Function Parameter

ParameterDescription
result :Required parameter. Mention a result set identifier returned by mysqli_query().

mysqli_field_count() Function Return Value

Return Values :Returns an integer that represents the number of fields or columns in the result set.

mysqli_field_count() Function Example