note 20121 added to function.sprintf
| From: | jrust at php2 dot chek dot com | Date: | Fri, 22 Mar 2002 23:15:30 +0000 |
| Subject: | note 20121 added to function.sprintf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28103@lists.php.net to get a copy of this message | ||
The example for argument swapping should look like:
$format = "The %2$s contains %1$d monkeys";
printf($format,$num,$location);
Note that the dollar sign is not supposed to be escaped with a backslash.
--
http://www.php.net/manual/en/function.sprintf.php
http://master.php.net/manage/user-notes.php?action=edit+20121
http://master.php.net/manage/user-notes.php?action=delete+20121
http://master.php.net/manage/user-notes.php?action=reject+20121