Welcome Guest, Not a member yet? Register   Sign In
array_walk + model
#1

[eluser]Zandy[/eluser]
Hi!

As you can specify that array_walk to call a function within this model

array_walk($ids, "unaFuncion");

Code:
function unaFuncion(&$value, $key) { $value = 2; }

but, not run,...
greetings :-)
#2

[eluser]Randy Casburn[/eluser]
Hola Zandy,

Does unaFuncion() return FALSE or "not run"?

What happens if you change { $value = 2 } to { echo "$key = $value" }?

Randy
#3

[eluser]Colin Williams[/eluser]
I'm not sure you can use a class member function with array_walk(). Your title says 'array_walk + model' so I assume you might be trying to walk an array with a model method? Not sure that is possible.




Theme © iAndrew 2016 - Forum software by © MyBB