Dear All

Find below a code to populate a table.

The values in arrays are taken from text file.
This works fine.
But I want the subject as the array value and not just the standard arearing in this table
please help

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" colspan="3" valign="top">&nbsp;</td>
</tr>
<?php
for ($i=0; $i<=$la-1; $i++)
{
?>
<tr>
<td width="8%" align="center">&nbsp;</td>
<td width="19%" height="25" align="center" valign="top"><img src="bluearrow.jpg" width="15" height="11" vspace="2"></td>
<td width="73%" height="25" valign="top"><span class="text12b"> <a href="mailto:example@example.com?subject="""><?php echo $array[$i]; ?></a></span></td>
</tr>
<?php
}

?>
</table>

    while im not 100% sure as to what you are after ithink this will be a start:

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="19" colspan="3" valign="top">&nbsp;</td>
    </tr>
    <?php
    foreach($array as $key => $value){
    ?>
    <tr>
    <td width="8%" align="center">&nbsp;</td>
    <td width="19%" height="25" align="center" valign="top"><img src="bluearrow.jpg" width="15" height="11" vspace="2"></td>
    <td width="73%" height="25" valign="top"><span class="text12b"> <a href="mailto:example@example.com?subject="<?=$value;?>"><?php echo $value; ?></a></span></td>
    </tr>
    <?php
    }

    ?>
    </table>

    $key is the array key and $value is the array value.

      Write a Reply...