Get a character set object, with its properties in PHP
Description
The following code shows how to get a character set object, with its properties.
Example
// w w w. j a va2s .co m
<?php
$con=mysqli_connect("localhost","root","","test");
// Check connection
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
var_dump(mysqli_get_charset($con));
mysqli_close($con);
?>
The code above generates the following result.