I am using the following code for passing the array value into mysql query but array to string conversion error will come
$sql =mysql_query("SELECT userId from groupmembers where groupId='$groupId'");
$bjson = array();
$i = 0;
while($result=mysql_fetch_assoc($sql))
{
$bjson[$i]['userId'] = $result['userId'];
$i++;
}
$query = "SELECT firstName
FROM users
WHERE userId IN('" . implode("','", $bjson) ."')";