unable to display values from array in a view |
11-25-2017, 10:34 AM
(This post was last modified: 11-25-2017, 10:35 AM by PaulD. Edit Reason: minor typo )
Your problem is that your array does not contain the index 'payment_description' so when you try to output it then php is saying it is not defined, which it is not. It seems you are selecting it though in your model, which is strange.
If I were in this situation, I would first output the query string itself and check it is doing what I expected. Use $this->db->last_query() as described in docs: https://www.codeigniter.com/user_guide/d...lpers.html Then run the query that was outputted in your database directly and look at the results. Again, are they what you expected? ie do they have payment description field in them. If you remove the line for payment description, is your code finding and displaying the payment_amount? If so you are doing nothing wrong in your output, just that the index is not defined for payment_description. Hope that helps, Paul. |
Welcome Guest, Not a member yet? Register Sign In |