Much like fashion models, it seems that managing CodeIgniter models can be a little tricky. I always ended up with a massive pile of set_value() calls for each of the elements I wanted to load in. In order to ‘bosh this, I wrote this function to do it automagically.

It will grab all the variables you’ve declared for the model, then try to load them up with submitted data. Nifty.