S
S
semki0962016-03-04 13:17:44
CodeIgniter
semki096, 2016-03-04 13:17:44

How to change the structure of an array in Codeigniter?

I change the structure of the array in the index file something like this

for ($i = 0, $c = count($arr); $i < $c; $i++)
     {
       $new_arr[$arr[$i]['pid']][] = $arr[$i];
     }

Everything is working. But how to do it correctly in relation to the MVC concept?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question