note 46300 deleted from function.sprintf by sean
| From: | sean@php.net | Date: | Wed, 06 Oct 2004 15:40:36 +0000 |
| Subject: | note 46300 deleted from function.sprintf by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78069@lists.php.net to get a copy of this message | ||
Note Submitter: csst0266 at cs dot uoi dot gr
----
In case you have many things to echo(), the use of sprintf() seems to pay off (at least when it
comes to readability); e.g.:
Without sprintf():
<?php
echo '$a = ', $a, ', $b = ', $b, ', $c = ', $c;
?>
And with sprintf():
<?php
echo sprintf('$a = %s, $b = %s, $c = %s', $a, $b, $c);
?>