I try to write a script and a problem. Can you let me know if you know how i can do this or ask someone if they know how can this be possibe.

1. Max numbers which can be selected 1 to 20 numbers. it can loop and select any number between 1-20
2. ignore these numbers e.g. 1,2,4,6,9,12 this will be array which can change.
3. each array line can have upto 4 numbers
4. Each array line needs to be unique 
5.I need to have around 10 arrays unique
5. Max 2 numbers can match previous numbers see below.

How can i go about doing this. Any help would be great.

```

e.g.

Array(
    [0] => Array
    (
        [0] => 3
        [1] => 16
        [2] => 22
        [3] => 24
    )
    [1] => Array
    (
        [0] => 3
        [1] => 16
        [2] => 7
        [3] => 13
    )
    [2] => Array
    (
        [0] => 20
        [1] => 17
        [2] => 10
        [3] => 18
    )
)

This not allow as some array match each other

Array(
    [0] => Array
    (
        [0] => 3
        [1] => 16
        [2] => 22
        [3] => 24
    )
    [1] => Array - cant have this as 3 of the numbers matchs the previous array.only two numbers can match.
    (
        [0] => 3
        [1] => 16
        [2] => 22
        [3] => 13
    )
    [2] => Array
    (
        [0] => 20
        [1] => 17
        [2] => 10
        [3] => 18
    )
)

```

Thank you.