I am getting this error in codeigniter 3. I had tried most of the things but none of them worked. Answer Increase memory_limit in your php.ini file. If this is not resolving the issues: 2) Add this line ini_set(‘memory_limit’, ‘-1’); before the line where you get the error
Tag: codeigniter
Multiple Foreach Loop Codeigniter
I want to display data in different sections, but error when I run. Controller View Answer $tamu array variable get replaced $tamu string in first foreach so dont’t do that working code is as below:
How can I get the average star ratings? PHP Codeigniter
I am creating a rating system where the customer can rate the seller. I am using the rateyo plugin, so there’s a float value on it like 2.9, 3.8, 4.5, etc I would like to get all the values of the seller and get the average from it to display his/her overall total ratings. I am using Codeigniter as a
comparing column in database to values in array of objects
i have this array of objects as a result of the following code: it produces something like this : next step, sending this array to model like this: next, filtering like this: i want to filter the rows based on the values in the $varIds array of objects, but this does not work as the where_in clause gives error array
Codeigniter 4 doesnt declare models when put inside constructor
I have a problem when i want to declare models only once, i make it like this but its get error saying undefined variable $komikModel on this line 12 which is this how do i fix this ? or maybe you can suggest with better practice than this one. Answer change to
Check if data is in array in PHP [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago. Improve this question Using Codeigniter 3 I need to compare two json object. To explain better, below the json data I have to
Accumulate monthly totals while looping
I have an array of data containing monthly amounts from the current year and the previous year. The previous year always has all of its amounts, but when a current/future month in the current year is iterated it has a null value. Here is an example: This is my current code How can I roll previous month amounts into current
Merge multiple CodeIgniter result sets into one array
Data queried from the database. and Here I create a method called `GetData(), I create a loop from 1-12 based on the months in a year. Next I want to combine data in an array, but how do I combine the data? Below is my controller model which calls the same model method over and over with different parameters: I
I’m having a problem with codeigniter pagination
When I create pagination without category it works, but with the category, it works with wrong data. With category pagination, it should show the data of a single category. But unfortunately, it shows mixed category data. These things work fine on the Index function….. In my index controller… and my model for the index is … It works perfectly. But
How to order by use in codeigniter
My table data is like that ID NAME order 1 English 0 2 Italian 1 3 Spanish 2 4 Hindi 1 5 Bengali 3 6 Tamil 2 my query I want data like this order-1,1,2,2,3,0 ID NAME order 2 Italian 1 4 Hindi 1 3 Spanish 2 6 Tamil 2 5 Bengali 3 1 English 0 Answer Try this: