Posted By

tasmanweb on 04/30/11


Tagged

php function sanitize


Versions (?)

stripformslashes: strip extra slashes if magic quotes is on, works with strings or arrays


 / Published in: PHP
 

  1. /* used to strip extra slashes if magic quotes is on, works with strings or arrays
  2. stripformslashes($variable)
  3. */
  4. function stripformslashes($variable) {
  5. return (!is_array($variable)) stripslashes($variable) : array_map('stripFormSlashes',$variable);
  6. }
  7. return $variable;
  8. }

Report this snippet  

You need to login to post a comment.