EDIT- First you need to download the driver
Microsoft Drivers for PHP for SQL Server - SQL Server | Microsoft Docs the ini files and restart XAMPP
Now go to your XAMPP installation and search for php.dll It will display correct PHP dll you have.
1) move following files to xampp/php/ext directory.
php_sqlsrv_53_nts_vc9.dll
php_pdo_sqlsrv_53_nts_vc9.dll
2) If you have php5ts.dll then move following files to xampp/php/ext directory.
php_sqlsrv_53_ts_vc9.dll
php_pdo_sqlsrv_53_ts_vc9.dll
above files should be used if your PHP version is compiled with Visual C++ 9.0 . Else following files should be used.
1) If you have php.dll then move following files to xampp/php/ext directory.
php_sqlsrv_53_nts_vc6.dll
php_pdo_sqlsrv_53_nts_vc6.dll
2) If you have php5ts.dll then move following files to xampp/php/ext directory.
php_sqlsrv_53_ts_vc6.dll
php_pdo_sqlsrv_53_ts_vc6.dll
Now we have to load files that we added recently. Open the php ini file and add entry in the area of dynamic extensions as follow.
extension=php_sqlsrv_53_nts_vc9.dll
extension= php_pdo_sqlsrv_53_nts_vc9 .dll
Save the ini files and restart XAMPP
work fine here:
https://ibb.co/w4ZZpLM