All pastes #426924 Raw Edit

Someone

public php v1 · immutable
·published 2007-04-06 14:19 UTC
rendered paste body
function gene_login($chaine1, $chaine2){ $tofind = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ .-_'"; $replace = "AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn     "; $tmp=explode(" ",strtolower(strtr($chaine1,$tofind,$replace))); $prenom_login=''; foreach($tmp as $key=>$val) {   $prenom_login .= substr($val,0,1); } $nom_login=substr(str_replace(' ','',strtolower(strtr($chaine2,$tofind,$replace))),0,8-sizeof($tmp)); $resultat=$prenom_login . $nom_login; return($resultat);}