ID: 15030 Updated by: hholzgra Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Output Control Operating System: Debian Linux PHP Version: 4.0.6 New Comment:
just a short explaination: echo contatenates nothing, it *immediately* generates the requested output plus arguments are evaluated before they are passed to a function (lets assume "echo" is a function for now) so before "echo" is called the argument string is evaluated, for this Translate() is called, which itself contains an echo call which is executed first now what you wand is "return $R;" instead of "echo $R;" in Translate() Previous Comments: ------------------------------------------------------------------------ [2002-01-14 10:12:27] [EMAIL PROTECTED] User error, go read www.php.net/echo Bogus ------------------------------------------------------------------------ [2002-01-14 10:09:48] [EMAIL PROTECTED] <? function Translate($R) { echo $R; } echo "<i>".Translate("This should be in italics, but -- weird! -- it's normal.")."</i> "; ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15030&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]