I need to display Firstname as a fixed lenght, irrespective of how long firstname is, so that the phone nunmber in front can
start from the same area. I have written some code, but it does not work. I need the telephone numbers to start at the
same point, irrespective of the length of the first name. For example for 09839 8339040 to be directly below 08900 6672882

However, this is what I currently get

Malcolm 08900 6672882
Helen 09839 8339040

below is the code that I am currently using

[CODE]

$length = $rowMember['len'];
$length = 50 - $length;
<td><?echo str_pad($firstnames, $length, " ", STR_PAD_RIGHT)?>:&nbsp;&nbsp;&nbsp;&nbsp;<?=$mobilephone?></td>

$lenSp = $rowMemberSpouse['lenSp'];
$lenSp = 50 - $lenSp;
<?echo str_pad($spfirstnames,$lenSp, " ", STR_PAD_RIGHT)?>:&nbsp;&nbsp;&nbsp;&nbsp;<?=$spMobilePhone?></td>

[/CODE]

Please can anybody help?

Ade

Make a correct table:

<table>
    <tr>
        <td>First Name</td>
        <td>Phone number</td>
    </tr>
</table>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.