src/MysqliLib.php
public static function escapeValues(array $data, \mysqli $mysqli)
    {
        foreach($data as $index => $value)
        {
            if ($value !== null)
            {
                $data[$index] = mysqli_escape_string($mysqli, $value);
            }
        }
        
        return $data;
    }
public static function escapeValues(array $data, \mysqli $mysqli)
    {
        foreach($data as $index => $value)
        {
            if ($value !== null)
            {
                $data[$index] = mysqli_escape_string($mysqli, $value);
            }
        }
        
        return $data;
    }
public static function escapeValues ( array $ data , \ mysqli $ mysqli ) { foreach ( $ data as $ index => $ value ) { if ( $ value !== null ) { $ data [ $ index ] = mysqli_escape_string ( $ mysqli , $ value ) ; } } return $ data ; }
Escape an array of data for the database.
@param array $data - the data to be escaped, either as list or name/value pairs
@param \mysqli $mysqli - the mysqli connection we are going to use for escaping.
@return array - the escaped input array.
Escape an array of data for the database .