0
what is alternative ways to replace , the function function_construct()
<?php class curd { private $conn; //what is the errors below in the function function__construct() { try { $this->conn = new mysqli("localhost", "root","","php_oops"); } catch(Exception $e) { echo "not connected. Try again "; } } public function insert($data) { echo "<pre>"; print_r($data); echo "</pre>"; } } ?>
2 Réponses
+ 4
Please use appropriate tags for programming language. Thanks!
+ 2
If you come across such doubt in the future, between function and construct put space okay.
function __cunstruct()