Re: sprintf() problem

From: Date: Wed, 10 Jul 2002 17:36:26 +0000
Subject: Re: sprintf() problem
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-11261@lists.php.net to get a copy of this message
Sorry, but this email address is not the appropriate forum for asking support questions. For a list of more appropriate places to ask for help using PHP, please visit http://php.net/support Thank you for your interest in PHP. Goba [one webmaster@php.net] ----- Original Message ----- From: Roberto Baeza To: webmaster@php.net Sent: Wednesday, July 10, 2002 7:13 PM Subject: sprintf() problem When I use sprintf() and I need to justify a string to the right for example $strformatted = sprintf( "Example %50s","Hello"); print $strformatted; This doesn´t work, the function doesn´t put the blank spaces before the word Hello. This will print ExampleHello If I do this does work but I need blank spaces, that it´s supposed to be the default character $strformatted = sprintf( "Example %'x50s","Hello"); print $strformatted; this wil print Examplexxxxxxxxx...Hello I ran this test in two different servers running PHP, one with Windows XP and another with Linux Thank you very much.

« previous php.mirrors (#11261) next »