in reply to Format text problem

You might also try this:
$str = sprintf("Player Name: %-50s\nParent's Name: %-50s\nMember ID: % +-50s\n",$player,$parent,$memberid); return $str;
That way, I don't think you will need to change your main code.

Replies are listed 'Best First'.
Re^2: Format text problem
by b310 (Scribe) on Apr 02, 2005 at 20:38 UTC
    Hi,

    I tried your suggestions. It worked sort of. This is my result in the email:

    Player Name: Dopey
    Parent's Name: Pluto
    Member ID: 7878
    The information is not aligned directly underneath each other. My objective was to have the first column which displays the labels to be a width of 30 and the second column should be a width of 50.
      That will be very difficult to achieve in an e-mail as it depends on the e-mail client that gets the message, the fonts used on the user's system, ...

      One should never expect that the formatting one has applied will "survive" after sending the e-mail.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law