[PHP] Help! PRINTF Function
Hello, The following examples don't work printf([%10s]\n, $s); // justification à droite avec des espaces printf([%-10s]\n, $s); // justification à gauche avec des espaces but this one: printf([%'#10s]\n, $s); // utilisation du caractère personnalisé de séparation '#' is ok (with any separator) Source: http://ch2.php.net/manual/fr/function.sprintf.php Is it related to French characters set I used for displaying my page ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=fr lang=fr Thanks for your advice N. TRUONG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help! PRINTF Function
On 06/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, The following examples don't work printf([%10s]\n, $s); // justification à droite avec des espaces printf([%-10s]\n, $s); // justification à gauche avec des espaces but this one: printf([%'#10s]\n, $s); // utilisation du caractère personnalisé de séparation '#' is ok (with any separator) Source: http://ch2.php.net/manual/fr/function.sprintf.php Is it related to French characters set I used for displaying my page ? We'd only know if you told us what doesn't work means. Do you get _any_ output? What? Error messages? Are you sure that you're using UTF-8 encoding? Dotan Cohen http://what-is-what.com/what_is/xml.html
Re: [PHP] Help! PRINTF Function
# [EMAIL PROTECTED] / 2006-11-06 12:46:14 +0100: Hello, The following examples don't work printf([%10s]\n, $s); // justification ? droite avec des espaces printf([%-10s]\n, $s); // justification ? gauche avec des espaces but this one: printf([%'#10s]\n, $s); // utilisation du caract?re personnalisé de séparation '#' is ok (with any separator) it works: [EMAIL PROTECTED] ~ 1003:0 php tmp/scratch [monkey] [monkey] [monkey] [monkey] [monkey] [many monke] [EMAIL PROTECTED] ~ 1004:0 Is it related to French characters set I used for displaying my page ? No, it's related to your browser replacing multiple whitespace characters with a single horizontal space. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php