How to use php to cycle out 120 possibilities by grouping the numbers of 1, 2, 3, 4, 4, 5 and 6 into a group of 3?

how can you use php to cycle out 120 possibilities if you group the numbers of one, two, three, three, four, five, five, six?
for example:
/ / 123 124 125 126
/ / 132 134 135 136
/ / 142 143 145 146
/ / 152153154156
/ / 162.163.164.165
/ / 213214215216
/ / 231.234.235.236
. Wait

Jan.26,2022

int[] value = {1,2,3,4,5,6}
for(int index1=0;index1<value.length;PPindex1){
    for(int index2=0;index2<value.length;PPindex2){
        if(index2==index1) continue; // 
        for(int index3=0;index3<value.length;PPindex3){
            if(index3==index1 || index3 == index2) continue; 
            cout<<value[index1]<<value[index2]<<value[index3];
        }
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb0f0c-480da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb0f0c-480da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?