mysqli_character_set_name

(PHP 5 CVS only)

mysqli_character_set_name

(no version information, might be only in CVS)

mysqli->character_set_name -- Returns the default character set for the database connection

Description

Procedural style:

string mysqli_character_set_name ( object link)

Object oriented style (method):

class mysqli {

string character_set_name ( void )

}

Returns the current character set for the database connection specified by the link parameter.

Return values

The default character set for the current connection

Example

Example 1. Using the mysqli_character_set_name function

<?php
                                                     
    
/* Open a connection */
    
$link = mysqli_connect("localhost", "username", "password");
                                                                              
    
/* Print current character set */
    
$charset = mysqli_character_set_name($link);
    
printf ("Current character set is %s\n",$charset);

?>

See also

mysqli_real_escape_string().