title: mysql - match an array of years for datetime field
body: <p>is it possible to match array of years in a single query for dateTime format as example 2017-12-12 00:00:00</p>
  
  <p>i tried it like this but its not working. </p>
  
  <pre><code>$years=implode(",",$year);
  SELECT * FROM mytable WHERE YEAR(reg-date) = '$years'; 
  </code></pre>
  
  <p>it will only return the first year in the array.</p>
  
  <p>How can I query the table to return all the years in the array?</p>