![]() |
Check field and rewrite to array - 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: Check field and rewrite to array (/showthread.php?tid=47872) |
Check field and rewrite to array - El Forum - 12-26-2011 [eluser]kolxoznik1[/eluser] I need to truncate string and rewrite it back to array I have got a function where I get data to array from data base Code: $data['about_text_list'] = $this->about_text_model->get_array(); I get these fields from data base : id, num, header, text, language I need to strip_tags and truncate text in array $data['about_text_list'] in every field 'text' and rewrite new data back to array $data['about_text_list'] I try to do this Code: foreach ($data['about_text_list'] as $items) After all I send array to view and in view I do foreach to displat text Code: <? foreach ($about_text_list as $line) : ?> But I do not get any error and I get the full text with all html tags. Please tell me how to do this (operation with array) |