0

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

2
Contributors
1
Reply
13
Views
4 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.