Answer the question
In order to leave comments, you need to log in
How to encrypt first 3 letters in php?
Good day.
I have this code:
echo json_encode("Почта вашего запрашиваемого аккаунта: ".$_SESSION['email_fetch'].". Отправить код восстанновления на почту?");
$_SESSION['email_fetch']
Answer the question
In order to leave comments, you need to log in
function hideEmail(string $email, int $length = 3, string $symbol = '*'): string
{
$emailData = explode('@', $email);
$username = str_split($emailData[0], $length);
$middle = floor(count($username) / 2);
$username[$middle] = str_repeat($symbol, $length);
return implode('', $username) . '@' . $emailData[1];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question