1.

Which one of the following statements instantiates the mysqli class?(a) mysqli = new mysqli()(b) $mysqli = new mysqli()(c) $mysqli->new.mysqli()(d) mysqli->new.mysqli()The question was posed to me during an online interview.Origin of the question is Working with Databases-1 topic in chapter Objects and Databases in PHP of PHP

Answer»

Right choice is (B) $mysqli = new mysqli()

Best explanation: If you CHOOSE to INTERACT with MySQL SERVER using the object-oriented INTERFACE, you need to first instantiate the mysqli class via its constructor.



Discussion

No Comment Found

Related InterviewSolutions