note 49342 added to language.types.string
| From: | shadda at gmail dot com | Date: | Tue, 25 Jan 2005 00:39:54 +0000 |
| Subject: | note 49342 added to language.types.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83902@lists.php.net to get a copy of this message | ||
It's fun to use heredoc syntax in conjunction with sprintf, and quite effective in my opinion.
sprintf(<<<EOS
The dog ran over the %s,
and landed on the %s
EOS
,'cat','floor');
Dunno if anyone else likes this method, but Its certainly usefull for constructing long verbose SQL
statements.
Cheers.
----
Manual Page -- http://www.php.net/manual/en/language.types.string.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49342
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49342&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49342&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49342&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49342&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49342&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49342&report=yes
Search -- http://master.php.net/manage/user-notes.php