title: How to add white space in search string in php?
body: <p>I have search function on my web page which works well when the single word is types in the search box. But if there are two or more words with in white space in between, the result shows 'no match found'. the code is like this:</p>
  
  <pre><code>$conn = new mysqli($servername, $username, $password, $dbname);
  if(isset($_POST['search'])){
  $searchq = $_POST['search'];
  $searchq = preg_replace("#[^0-9a-z]#i", "", $searchq);
  $sql = "SELECT * FROM products WHERE category LIKE '%$searchq%' OR name LIKE '%$searchq%' OR format LIKE '%$searchq%' OR size LIKE '%$searchq%' OR description LIKE '%$searchq%' ORDER BY name ASC";
  $result = $conn-&gt;query($sql);
  </code></pre>
  
  <p>What may be the solution?</p>