title: mysql WHERE IN array string / username
body: <p>Code:</p>
  
  <pre><code>$friendsArray = array("zac1987", "peter", "micellelimmeizheng1152013142");
  $friendsArray2 = join(', ',$friendsArray);  
  $query120 = "SELECT picturemedium FROM users WHERE username IN ('$friendsArray2')";
  echo $query120;
  </code></pre>
  
  <p>This is the output :</p>
  
  <pre><code>SELECT picturemedium FROM users WHERE username IN ('zac1987, peter, micellelimmeizheng1152013142')
  </code></pre>
  
  <p>It fails because usernames are not wrapped by single quotes like 'zac1987', 'peter', 'mice...'. How can each username be wrapped with single quotes?</p>