Are you using Xamppp 7.x for Windows?
It happened to me when I upgraded my Xampp 5.6 to Xampp 7.1. Inspecting the configuration file C:\Xampp\php\php.ini, I noticed a lot of errors involving the name of PHP extensions (they lack the prefix php_ and the suffix .dll). One of them is related to mysqli.
The wrong setting I found there:
extension=mysqli
The right setting (after editing this line):
extension=php_mysqli.dll
Correcting that solved my problem.
By the way: don't forget to correct all other wrong settings (the correct name of the extensions can be seen at C:\xampp\php\ext).