note 95426 added to function.sprintf
| From: | Anonymous at osu1 dot php dot net | Date: | Sun, 03 Jan 2010 01:25:06 +0000 |
| Subject: | note 95426 added to function.sprintf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164547@lists.php.net to get a copy of this message | ||
L'explication sur cette page est incorrecte
les exemple 3 et 4 sont faux
%1$s n'est pas valide, la syntaxe correcte est %1\$
Exemples corrigés
Example #3 Argument swapping
<?php
$format = 'The %2\$s contains %1\$d monkeys';
printf($format, $num, $location);
?>
Example #4 Argument swapping
<?php
$format = 'The %\2$s contains %1\$d monkeys.
That\'s a nice %2\$s full of %1\$d monkeys.';
printf($format, $num, $location);
?>
----
Server IP: 217.71.118.186
Probable Submitter: 213.219.182.218
----
Manual Page -- http://www.php.net/manual/en/function.sprintf.php
Edit -- https://master.php.net/note/edit/95426
Del: integrated -- https://master.php.net/note/delete/95426/integrated
Del: useless -- https://master.php.net/note/delete/95426/useless
Del: bad code -- https://master.php.net/note/delete/95426/bad+code
Del: spam -- https://master.php.net/note/delete/95426/spam
Del: non-english -- https://master.php.net/note/delete/95426/non-english
Del: in docs -- https://master.php.net/note/delete/95426/in+docs
Del: other reasons-- https://master.php.net/note/delete/95426
Reject -- https://master.php.net/note/reject/95426
Search -- https://master.php.net/manage/user-notes.php