What is the difference between using mysqli_connect() and new mysqli() for connecting mysql databases ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

What is the difference between using mysqli_connect() and new mysqli() for connecting mysql databases ?

I have seen some places $conn = new mysqli('server' , 'username' , 'password' ); and some places $conn = mysqli_connect('server' , 'username' , 'password' ); can someone explain what is the difference between them.?

14th Jun 2018, 5:44 PM
Sachintha Sampath
Sachintha Sampath - avatar
1 Resposta
+ 2
Between them there is no difference, you also need to look at this. http://ca2.php.net/manual/en/book.mysqli.php
14th Jun 2018, 5:54 PM
Alexander Sokolov
Alexander Sokolov - avatar