How to make combination of two number in array

I want to make combination of all elements of array
for example in a array of size 4
the elements are 1 2 3 4
if I want to make combinations like this
:- 12,13,14,21,23,24,31,32,34,41,42,43
how to do this in the form of code

You can use two for loop , one will select outer element and one for inner.
Do outer element10+inner
say outer is currently pointing to 0 and inner points to 1 then it will do 1
10+2 =12