Hello all.
I've never been any good at this sadly enough. Maybe someone could shed some light as to why this happens:
When $tot is even, everything runs smooth. When $tot is odd, every few rows (starting at $i == 3) it puts terminates a row prematurely. The problem seems to be sporadic instead of intermitten, but only on odd $tot counts.
Hope that makes sense.
$tot = count($pteam);
$row = $pteam;
for($i=0; $i < $tot; $i++){
if($i % 2 == 0)
echo '<tr>';
echo '<td align="left">';
echo '<img src="'.$row[$i]['picture'].'" border="0" align="absMiddle" width="115" height="105">';
echo '</td>';
echo '<td';
echo ($i !== $tot - 1) ? '' : ' colspan="3"';
echo '>';
echo '<p><b>Name: </b>'.$row[$i]['name'].'<br>
<b>Phone: </b>'.$row[$i]['phone'].'<br>
<b>E-Mail: </b>'.$row[$i]['email1'].'<br></p>';
echo '</td>';
if($tot % $i == 1 || $i == $tot - 1)
echo '</tr>';
}
TIA. 🙂
It's not the ternary operator either, I tried removing it to no avail.