Re: [PHP] array_walk, or array_map, or foreach?

2006-10-20 Thread Robert Cummings
On Fri, 2006-10-20 at 16:04 +0900, Dave M G wrote: > PHP List, > > I took a snippet of code right off the php.net site to use trim on all > the elements of an array. > > Theoretically, it should test if the element in an array is in turn > another array, and break it down to the next level unti

Re: [PHP] Array_Walk error messages

2004-11-07 Thread Curt Zirzow
* Thus wrote Stuart Felenstein: > Can anyone give me a clue what I have done wrong here. > > //These would be passed as ints: > array_walk($l_industry, 'mysql_escape_string'); > Warning: Wrong parameter count for > mysql_escape_string() in > /xxx//public_html/Test2.php on line 104 > The call

Re: [PHP] array_walk

2002-06-06 Thread Dan Hardiker
> Instead of passing "this" and "other" to your array, PHP > passes "0" and "other". Is there any way I can make it > so that it passes "this"? [pulled from the manual directly] Example 1. array_walk() example $fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); funct

Re: [PHP] array_walk inside class method

2002-01-22 Thread S. Murali Krishna
Dear Gyozo You have sent me the following solution thru php mailing list. I have also asked you a doubt about the syntax. I want to explain this syntax to my colleagues, could u pls point me to any documentation of this syntax or any article. if possible pls explain y

Re: [PHP] array_walk inside class method

2002-01-07 Thread S. Murali Krishna
Hi Thanks for ur help. Its Working but I couldn't understand the syntax given by u can u explain pls. Thanks again. On Sun, 6 Jan 2002, Gyozo Papp wrote: > it may be better: > > array_walk($this->array, array(&$this, 'func1'); > > "Attila Strauss" <[EMAIL PROTECTED]>

Re: [PHP] array_walk inside class method

2002-01-05 Thread Gyozo Papp
it may be better: array_walk($this->array, array(&$this, 'func1'); "Attila Strauss" <[EMAIL PROTECTED]> wrote in message 001d01c195db$67647da0$[EMAIL PROTECTED]">news:001d01c195db$67647da0$[EMAIL PROTECTED]... | hi | | $this->func1(); | | | best regards | attila | | | > | >

Re: [PHP] array_walk inside class method

2002-01-05 Thread Attila Strauss
hi $this->func1(); best regards attila > > > Hi All, > I want to use "array_walk" function inside a class method. But the > problem is i want the second argument to array_walk ( function name ) > be a another function of the same class. when i gave like that its telling > > Error : function n

Re: [PHP] array_walk() + class methods

2001-12-22 Thread Jeff Levy
Much obliged, that did the trick. On Fri, 21 Dec 2001 05:48:31 -0500, Papp Gyozo wrote: > array_walk($ar, array(&$object, 'methodname')); > > - Original Message - > From: "Jeff Levy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> > Sent: Thursday, December 13, 2001 1:17 PM Subject: [PHP] a

Re: [PHP] array_walk() + class methods

2001-12-21 Thread Papp Gyozo
array_walk($ar, array(&$object, 'methodname')); - Original Message - From: "Jeff Levy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 1:17 PM Subject: [PHP] array_walk() + class methods | I'd like to call a class method with array_walk(). Is this