Jump to content


Photo

printf and making things left justified


  • Please log in to reply
1 reply to this topic

#1 jlong32

jlong32
  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationLexington

Posted 31 August 2006 - 08:36 PM

where would i put the - character in the following code in order to make it left justified?

printf("%30s ","School");
The completely lost PHP Programmer

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 31 August 2006 - 08:48 PM

%-30s. Look at sprintf in the manual.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users