Skip to content

pl_plec ​

php
string pl_plec ( string $imie )

Determines gender from a first name: M for male, K for female, or an empty string if the name is not found in the database.

Provide the first name in $imie.

Example:

php
$imie = "Jan";
$plec = pl_plec($imie);
if ($plec == 'M') {
    print('Male');
} else($plec == 'K') {
    print('Female');
}

Result:

Male