String to Entity


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. function strtoentity($input)
  2. {
  3. foreach (str_split($input) as $obj)
  4. {
  5. $output .= '&#' . ord($obj) . ';';
  6. }
  7. return $output;
  8. }

URL: http://kirkstrobeck.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.