Posted By

calvin on 12/04/08


Tagged

xml safe characters


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jeremyhcobb


XML safe characters


 / Published in: PHP
 

  1. function xmlSafe($input)
  2. {
  3. return str_replace(array('&','\'','"','<','>'),array('&amp;','&apos;','&quot;','&lt;','&gt;'),$input);
  4. }

Report this snippet  

You need to login to post a comment.