What is a Wrapper Function? + a Basic Example

Wikipedia defines wrapper functions this way: A wrapper function is a subroutine in a software library or a computer program whose main purpose is to call a second subroutine or a system call with little or no additional computation. So basically, a wrapper function is simply a function used to […]

Category: PHP

Changing From mysql_ Functions to mysqli_

Creating a Connection Creating and closing a connection are exactly the same using mysqli_: // Creating a Connection with mysql_connect() $conn = mysql_connect($servername, $username, $password); // Do stuff with database here. // Close the Connection mysql_close($conn); //////////////////////////////////// // Creating a Connection with mysqli_connect() $conn = mysqli_connect($servername, $username, $password); // Do […]