php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2333 array_walk & echo troubles.
Submitted: 1999-09-20 08:16 UTC Modified: 1999-09-20 12:37 UTC
From: maycat at odessa dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 2 OS: Linux SlackWare 2.2.10
Private report: No CVE-ID: None
 [1999-09-20 08:16 UTC] maycat at odessa dot net
array_walk won't work at all.

echo "text1".(m_l($aa,bb))."text2";
in HTML looks like

Function result, Text1, Text2.

But imho correct is Text1, Func. res., Text 2.

but
echo text1;
echo m_l($aa,$bb);
echo text2;

is all ok.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-20 09:40 UTC] andrey at cvs dot php dot net
Your bug description is not really helpful. What is m_l?
 [1999-09-20 12:37 UTC] riffraff at cvs dot php dot net
try to submit a source code in which array_walk doesn't work.

are you sure, you RETURN the value from m_l() function and don't echo it?
if you have:
function fnc($a) {
  echo $a;
}
and write
echo "first ".fnc("second")." third";
then output stating "secondfirst  third" is right. instead of echo $a,
i should have used return to get "first second third".
it's just the way how it works.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC