Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active December 20, 2018 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/2d9dad3eccd66ed762b6960d3c583465 to your computer and use it in GitHub Desktop.
Save parzibyte/2d9dad3eccd66ed762b6960d3c583465 to your computer and use it in GitHub Desktop.
Limpiar asunto de correo created by parzibyte - https://repl.it/@parzibyte/Limpiar-asunto-de-correo
<?php
function limpiarAsunto($asunto)
{
$cadena = "Subject";
$longitud = strlen($cadena) + 2;
return substr(
iconv_mime_encode(
$cadena,
$asunto,
[
"input-charset" => "UTF-8",
"output-charset" => "UTF-8",
]
),
$longitud
);
}
echo limpiarAsunto("Activación de tu cuenta para bla bla");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment