mysql_num_fields en mysqli
$fieldcount=mysqli_num_fields($result);
Mohamed Sami khiari
$fieldcount=mysqli_num_fields($result);