Welcome Guest, Not a member yet? Register   Sign In
foreach on $this->input->post(), is it possible?
#4

[eluser]sheldonnbbaker[/eluser]
I was needing this functionality as well.

This simple function works (I extended the CI_Input library), but am not sure if it's the best way of doing it:

Code:
function posts() {
        
        $posts = array();
        
        foreach($_POST as $key => $value) {
            
            $posts[$key] = $this->post($key);
            
        }
        
        return $posts;
        
    }


Messages In This Thread
foreach on $this->input->post(), is it possible? - by El Forum - 09-17-2009, 07:45 AM
foreach on $this->input->post(), is it possible? - by El Forum - 09-17-2009, 07:49 AM
foreach on $this->input->post(), is it possible? - by El Forum - 09-17-2009, 08:03 AM
foreach on $this->input->post(), is it possible? - by El Forum - 12-06-2009, 04:29 PM
foreach on $this->input->post(), is it possible? - by El Forum - 12-06-2009, 04:48 PM
foreach on $this->input->post(), is it possible? - by El Forum - 12-06-2009, 04:57 PM
foreach on $this->input->post(), is it possible? - by El Forum - 12-06-2009, 05:13 PM
foreach on $this->input->post(), is it possible? - by El Forum - 12-09-2009, 11:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB