note 20121 deleted from function.sprintf by derick
| From: | derick@php.net | Date: | Tue, 16 Mar 2004 10:48:04 +0000 |
| Subject: | note 20121 deleted from function.sprintf by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66900@lists.php.net to get a copy of this message | ||
Note Submitter: jrust(at)rustyparts.com
----
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.