Hi all, I have a fairly simple problem. I have an array which prints out the following text:
1
Full, Gen. 3
TMSWK2D
9
Poor write quality
2
Full, Gen. 1
TMSWK2C
Read Only, Clean Tape
The problem is after some of the lines of text, there are empty values, causing there to be a line break. Here is the code that prints out the values.
<table>
<?php
$i=0;
while(isset($html[$i]))
{
?>
<tr>
<td><?php echo $html[$i]; ?></td>
</tr>
<?php
$i++;
}
?>
</table>
I have tried these two solutions in the hope that if one evaluates to true, then the $i++ would effectively skip the blank value and continue to print the next array value, but this hasn't worked.
if($html[$i] == " ")
{
$i++;
}
if(empty($html[$i]))
{
$i++;
}
Any help please?!