Skip to content

Popup won’t appear when clicked inside a table button

Can anyone suggest some alternative solution for this problem. I’ve made a popup form which i use css and javascript to trigger the display to none or flex every time i click into a specific button which is great. But this method seems to not work on a table as you can see below i’ve done a simple…

Target index of array

I’m trying to target the index of my array. For some reason my array turns out really weird. Now I get the results I need. But I need the name of each index too. Results: var export – $name: var_export – $mednames: var_export – $cnt: var_export – $c: Now the problem here is that …

How to test create model service?

I decided to create CreateClassroomService to separte logic in my controller method. I am trying to test this service as part of learning unit testing, but I don’t know how. I don’t know how to mock the classroom object to control what the method should return. Does this mean that creating this se…

Fatal error when using foreach on 3rd array

I’m getting an error when trying to use foreach on 3rd array My goal is to get those data above and expect it to loop until its last data using this code: It returns this error Here is the line 25 Error on line 25 Am I missing something? By the way I’m working on a proxy dashboard for a

Subtract tax from a price with tax in OpenCart?

How do I subtract all taxes from a price with tax in OpenCart? In the example below I use the default “Taxable goods” tax setting from OpenCart, which is 20% VAT + $2,00 Eco-Tax. This returns an incorrect value of $14,64 because it calculates the tax on $number (20,80), which already is a price wi…

fputcsv() problem. Textarea isn’t saved in one column

Today, I found my limit in data operations knowledge. I can successfully save input fields as well as textareas by doing this: Later on, I can retrieve the data and store it in array by using explode()… or so have I thought! The problem is in me. I like BIG textareas. I am currently making a forum page …