note 108947 added to function.sprintf

From: Date: Thu, 07 Jun 2012 11:21:06 +0000
Subject: note 108947 added to function.sprintf
Groups: php.notes 
Request: Send a blank email to php-notes+get-188440@lists.php.net to get a copy of this message
If you use argument numbering, then format specifications with the same number get the same argument; this can save repeating the argument in the function call. <?php $pattern = '%1$s %1$\'#10s %1$s!'; printf($pattern, "badgers"); ?> ---- Server IP: 202.89.58.1 Probable Submitter: 222.155.168.110 ---- Manual Page -- http://www.php.net/manual/en/function.sprintf.php Edit -- https://master.php.net/note/edit/108947 Del: integrated -- https://master.php.net/note/delete/108947/integrated Del: useless -- https://master.php.net/note/delete/108947/useless Del: bad code -- https://master.php.net/note/delete/108947/bad+code Del: spam -- https://master.php.net/note/delete/108947/spam Del: non-english -- https://master.php.net/note/delete/108947/non-english Del: in docs -- https://master.php.net/note/delete/108947/in+docs Del: other reasons-- https://master.php.net/note/delete/108947 Reject -- https://master.php.net/note/reject/108947 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188440) next »