title: Laravel Query: Php implode array string values
body: <p>Currently I have this variable</p>
  
  <p><code>$arrays = implode(", ", $request-&gt;pmChck);</code></p>
  
  <p>and If I try to return this variable. I will be getting this kind of output</p>
  
  <p><code>2019-100,2018-100</code></p>
  
  <p>As you can see the values are separated by commas</p>
  
  <p>Now in my laravel query, I'm trying to get all the records of the employee except for these two <code>company_id</code> above.</p>
  
  <p><code>$pm_selected = DB::connection('mysql')-&gt;select("SELECT * FROM view_employee_info WHERE company_id NOT IN('".$arrays."')");</code></p>
  
  <p>The query is not working, it shows all the data and also the data with the <code>company_id</code> of <code>2019-100 and 2018-100</code></p>
  
  <p>It should listing all the data except for these two <code>company_id</code> <code>2019-100 and 2018-100</code></p>
  
  <p>Is there anything wrong with my format or syntax? </p>