Guest User

Untitled

a guest
May 13th, 2014
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.  
  3.   /*
  4.    * lvl 1 : remove all "="
  5.    * lvl 2 : lvl 1 + remove all "or"
  6.    */
  7.  
  8. function rec_remove ($entry, $str)
  9. {
  10.   $count = 1;
  11.   while ($count > 0)
  12.     $entry = str_ireplace($str, "", $entry, $count);
  13.   return $entry;
  14. }
  15.  
  16. function lvl1_filter ($entry)
  17. {
  18.   $entry = rec_remove ($entry, "=");
  19.   return $entry;
  20. }
  21.  
  22. function lvl2_filter ($entry)
  23. {
  24.   $entry = lvl1_filter($entry);
  25.   return rec_remove ($entry,"or");
  26. }
  27.  
  28. ?>
Add Comment
Please, Sign In to add comment