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
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 until it gets to a
string it can use trim on.
This is the code:
* 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
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
//These would be passed as ints:
array_walk($l_tterm, 'my
> 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
If you use array_walk with an associative array, the only
arguments that PHP automatically passes to the defined
array are the numerical/element keys. Is there any way
you can force it to pass the associative keys?
For example, I have an array:
$bob = array( "this" => "other" );
Instead of pas
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
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]>
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
|
|
| >
| >
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
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 not exist.
class some()
{
function func
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
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
I'd like to call a class method with array_walk(). Is this possible?
class widget {
function sicballs($arg){
print $arg;
}
}
$x = new widget();
$ar = array('my','values');
array_walk($ar, ???)
...
the only way I've been able to get this (simplified) code to work the way
I want it is
i have class instance snagfu, of class snafu, with a method, fubar()
i have an array, $tarfu, and want to run it through array_walk(),
array_walk($tarfu, $snagfu->fubar) seems to be logical, if it's possible.
this obviously doesn't work.
How do i use a class method with array walk? or is it e
hi,
whats about using the array_walk function within an object?
php says that there is no callback function.
do you have an idea?
thx,
marcbey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To cont
16 matches
Mail list logo