Returns a character set object with properties:
<?php$con=mysqli_connect("localhost","my_user","my_password","my_db");//Detect connection if (mysqli_connect_errno($con)) { echo "Database connection failed: " . mysqli_connect_error(); }var_dump(mysqli_get_charset($con));mysqli_close($con);?>The mysqli_get_charset() function returns a character set object.
mysqli_get_charset( connection ) ;
parameter | describe |
---|---|
connection | Required. Specifies the MySQL connection to use. |
Return value: | Returns a character set object with the following properties: charset - character set name collation - the collation name dir - the directory character set to be retrieved or "" min_length - Minimum character length in bytes max_length - Maximum character length in bytes number - the internal character set number state - character set state |
---|---|
PHP version: | 5.1+ |