Which function in PHP is used to make a connection to a MySQL database?
- mysqli_query
- mysql_connect
- mysqli_connect
- PDO::connect
The correct function is mysqli_connect. This function is used to establish a connection to a MySQL database in PHP using the MySQLi extension.
Loading...
Related Quiz
- The filter_var() function with the FILTER_SANITIZE_STRING filter is used to sanitize a string in PHP.
- Once a constant is set in PHP, it cannot be ______ or ______.
- The PHP function that compares two arrays and returns the differences is called ________.
- What is the data type in PHP that is used to store a sequence of characters?
- How is it possible to set an infinite execution time for a PHP script?