I have a PHP function that returns me the specific set of userids in an array. I want to create a function that will convert these userids into usernames. I know how I can create a query to convert each one and then run the query in a loop. But is there a better way that I can do it for the whole array. Like a single query that would accept multiple values or something. My Array is as simple as:
[0] => 126312
[1] => 128383
[2] => 987376
[3] => 563542