Fri, 17 May 2024


How to get the number of fields in a MySQL result?

By: Nathalie, NetArt Media
Sat, 3 October 2020

There is a special function in PHP, mysql_num_fields, which allows to do this.

The syntax is as follows:

int mysql_num_fields ( resource result)


Category: PHP Examples
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox