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


/ Published in: PHP



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.