Filling and array foreach loop - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Filling and array foreach loop (/showthread.php?tid=39204) |
Filling and array foreach loop - El Forum - 03-04-2011 [eluser]Michal1[/eluser] Hello guys, I have been working on one script and I am stuck at filling my array. What I have in my view is this code Code: $backlinkSources = array (); Then in my one controller function I have this array Code: $data = array( And basically what I want to do is to take that name_them in my site_view and pass it into that name_thems field Code: array $backlinkSources = array ( But it does not work. Does somebody know what am I doing wrong? Please answer me as easy as possible as I am a beginner. Thank you Filling and array foreach loop - El Forum - 03-04-2011 [eluser]Wondering Coder[/eluser] is this what you want Your controller Code: function insert(){ Code: function insert_data($data){ View Code: <form method="post" action="<?=base_url()?>controller_name/insert"> Filling and array foreach loop - El Forum - 03-04-2011 [eluser]Michal1[/eluser] No I want to fill this array Code: $backlinkSources = array (); with everything from Code: $data = array( |