note 33870 added to function.sprintf
| From: | martin at schwedes dot com | Date: | Wed, 09 Jul 2003 20:45:14 +0000 |
| Subject: | note 33870 added to function.sprintf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51804@lists.php.net to get a copy of this message | ||
decision within sprintf:
$a = "today";
$b = sprintf('This is %s', $a=='today' ? 'today':'not
today');
echo $b;
// result: This is today
----
Manual Page -- http://www.php.net/manual/en/function.sprintf.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33870
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33870&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33870&report=yes