LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Ney_André_de_Mello_Zunino Date: Wed Sep 10 17:16:00 2003 Subject: Function calls and strings
Hello.
PHP possesses what the manual calls "complex syntax" for allowing one to
include non-trivial expressions in strings, e.g.:
$s = "The result is {$results[$foo]}.";
I seek to find out whether PHP also has a syntax to allow function calls
within a string, so that explicit concatenation is not needed. E.g.:
something like:
$s = "The result is {getResult($foo)}.";
as opposed to
$s = "The result is " . getResult($foo) . ".";
If that is not possible, I would appreciate if someone could suggest the
rationale.
Thank you,
--
| Navigate in group php.lang at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |