What's wrong in this loop?
<p>I checked and i don't found errors:</p>

<pre><code>$_SESSION['variable'] = 2 
$preparado[1] = "Miguel";
$preparado[2] = "Carlos";
$segundo[1]= "Beltran";
$segundo[2] = "Sanz";

for($i = 1; $i &lt;=$_SESSION['variable']; $i++){
  $listo[$i] = $preparado1[$i] . $segundo[1];
}


for($i = ($_SESSION['variable'] + 1) ; $i &lt;= ($_SESSION['variable'] * 2); $i++){
  for($n = 1; $n &lt;=$_SESSION['variable']; $n++){
    $listo[$i] = $preparado1[$n] . $segundo[2];
  }
}

for($i = 1;$i &lt;=$_SESSION['variable'] * $_SESSION['extension']; $i++ ){
  echo   $final[$i] . "&lt;/br&gt;";
}
</code></pre>

<p>I  recibe this:</p>

<pre><code>MiguelBeltran
CarlosBeltran
CarlosSanz
CarlosSanz
</code></pre>

<p>But I should recibe this:</p>

<pre><code>MiguelBeltran
CarlosBeltran
MiguelSanz
CarlosSanz
</code></pre>

<p>Thanks!!</p>
