Posted By

kirkstrobeck on 02/10/09


Tagged

String ascii entity entities


Versions (?)

String to Entity


 / Published in: PHP
 

URL: http://kirkstrobeck.com

Very helpful for a weak security on emails or other information..

  1. function strtoentity($input)
  2. {
  3. foreach (str_split($input) as $obj)
  4. {
  5. $output .= '&#' . ord($obj) . ';';
  6. }
  7. return $output;
  8. }

Report this snippet  

You need to login to post a comment.