PHP mysqli_get_charset() function returns a character set object providing several properties of the current active character set.
Syntax
object mysqli_get_charset(connection);
Parameter | Description |
---|---|
Connection : | Required parameter. The MySQL connection to be used. |
Return Values : | Returns a character set object with the following properties:
|
<?php $con = mysqli_get_charset("localhost","user","password","db"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } var_dump(mysqli_get_charset($con)); mysqli_close($con); ?>