Advertisement
Guest User

Untitled

a guest
Jun 5th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. $user_query_string = trim($_GET['search']);
  2. //TODO $user_query_string = preg_replace() per rimuovere più spazi con singolo spazio
  3.  
  4. $query_string = str_replace(
  5.     array('+', '-'),
  6.     array('&', '&!'),
  7.     $useR_query_string
  8. );
  9.  
  10. //è stato usato almeno un operatore booleano ?
  11. if ($user_query_string === $query_string) {
  12.     $query_string = str_replace(' ', '', $query_string);
  13. } else {
  14.     $query_string = str_replace(' ', '|');
  15. }
  16. //use $query_string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement