Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived General Discussion
array_walk + model
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
array_walk + model
El Forum
Guest
#1
09-01-2008, 11:10 AM
[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 :-)
El Forum
Guest
#2
09-01-2008, 11:20 AM
[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
El Forum
Guest
#3
09-01-2008, 03:46 PM
[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.
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB