I have this code:

```
<?php

    for($i=0; $i<count($data);$i++) {
        for($j=0; $j<count($data); $j++){
            if($i == $j){
            }else{
?>
            <th><?php echo $i.",".$j ?></th>
            <th><?php echo ("$data[$i]") ?></th>
            <th><?php echo ("$data[$j]")  ?></th>
<?php 
            }
        }   
    }
?> 

```

Current result:

```
0,1 12 13 0,2 12 14 1,0 12 11 1,2 12 13 2,0 13 11 2,1 13 12

```

Expected result:

```
0,1 12 13 
0,2 12 14 
1,0 12 11 
1,2 12 13 
2,0 13 11 
2,1 13 12

```

Any suggestions?