title: Notice: Array to string conversion when checking if value in PHP array exists in database
body: <p>I have stored the values 'A1, A4' in an array using <code>implode()</code> function - and I want to check if one of those values is already stored in the field Seats in the database flights_booked but so far I can't even the query to run without getting Notice: Array to string conversion error. Below is what I've done so far:</p>
  <pre><code>    $str = 'A1, A4';
  
  $myArray = explode(',', $str);
  
  print_r($myArray);
  
  require '../configure.php';
  require '../connectdb.php';
  
  
  $database = 'users';
  
  $db_found = new mysqli(DB_SERVER, DB_USER, DB_PASS, $database );
  
  $query = &quot;SELECT Seats FROM flights_booked WHERE Seats IN ('$myArray')&quot;;
  
  $result = mysqli_query($conn, $query);
  
  if($result) {
      
      echo &quot;Success&quot;;
  } else {
      echo &quot;Fail&quot;;
  }
  </code></pre>