How I can change value of objects array, which I got from $this->db->query('My Query');
(result is Object). I tried use foreach ($data->result() as $row)
- it is working fine, I can reach every variable, but I can't modify it by using "&" (foreach ($data->result() as &$row)
) because of Error (php don't show it). Any ideas?
We started with Q&A. Technical documentation is next, and we need your help.
Whether you're a beginner or an experienced developer, you can contribute.
|
|||
|
Use an extra variable.
|
|||||||||
|
If I understand what you mean, you are assuming that modifing the object you are editing also values in the database. If that's the case, you should run a query to update data in the database
==================== EDIT ==================== If you want to ignore date like
to print out a table you can use the HTML table class of Codeigniter passing the $result object. http://ellislab.com/codeigniter%20/user-guide/libraries/table.html
|
|||||||||||||||||||||
|
For some reasons, methods, that were offered don't work. I found solution, how to solve my problem:
|
|||
|