daily pastebin goal
70%
SHARE
TWEET

[PHP]: Converter string para ascii

garfield Feb 9th, 2012 125 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.                         @Nome: Converte String para caracteres em Ascii.
  3.                         @Créditos: [iPs]SuYaNw
  4. */
  5.  
  6. function StrToASCII($char, $sep = " ", $esp = "_")
  7. {
  8.         $out = "";
  9.         for($i = 0; $i < strlen($char); ++$i)$out .= $char[$i] == chr(32) ? $esp : ord($char[$i]).$sep;
  10.         return $out;
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top