Getting all possible combinations of 2 lists
<p>I have 2 lists:</p>

<ul>
<li>List1 has the elements (a,b,c,d,e)</li>
<li>List2 has the elements (1,2,3)</li>
</ul>

<p>I have to calculate all possible combinations using all the elements of the 2 arrays:</p>

<ul>
<li>Combinaton 1: a1, b2, c3, dNULL, eNULL</li>
<li>Combination 2: a1, bNULL, c2, d3, eNULL</li>
</ul>

<p>And so on. The length of the lists is dynamic. How do I write the function in PHP necessary to solve this problem?</p>
