Access this variable within the view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Access this variable within the view (/showthread.php?tid=77030) |
Access this variable within the view - andreaccident - 07-13-2020 I have the following two functions of which I load them into my "welcome_message" view passing through the parameters the $page_data. I am trying to access $result['unknown_Leads_not_assigned_previous_day']=$query->result_array(); in the view but I am getting errors. Am I returning something wrong? I am trying to access with <?= $unknown['unknown_Leads_not_assigned_previous_day'] ?>. Can someone help please? Thanks! PHP Code: public function index() { RE: Access this variable within the view - jreklund - 07-13-2020 loadChannelData() aren't returning anything. If it are doing so later on in the code. You need to make sure you have correct data in your $page_data array before passing it into the view. And if it does, you need to do a var_dump() on $unknown in the view. You are also subject of SQL Injections, I can drop or dump all your information if I wanted. |