note 46300 added to function.sprintf

From: Date: Wed, 06 Oct 2004 07:48:41 +0000
Subject: note 46300 added to function.sprintf
Groups: php.notes 
Request: Send a blank email to php-notes+get-78060@lists.php.net to get a copy of this message
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); ?> ---- Manual Page -- http://www.php.net/manual/en/function.sprintf.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46300 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46300&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46300&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78060) next »