$ids = array_column($communications, 'id');//其中id 为列名,communications为需要分割的数组$output = implode(',', $ids); Tags:phpexplode