Help! PRINTF Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux