I need to open 2 files from my filesystem. Both files are csv-files. I need to determine the differences from both files: So I need to check, how the content has changed from yesterday compared to today. There will be exactly 1 file every day. The files are labeled according to the timestamp, so there is no r…
What is the difference between with, compact and array in when return view in laravel
I’m little bit confuse I want to know the difference between those three returns: return view(‘post’, [‘post’ => $post]); return view(‘post’, compact(‘post’)); return view(‘post’)->with(‘post’=>$post); So, can someone expla…
Every modification to class causes error ‘Cannot declare class because the name is already in use’
I’ve started a Symfony project for an API and have created my first controller # services.yaml parameters: services: _defaults: autowire: true autoconfigure: true App: …
Hook woocommerce_checkout_order_processed order items issue
I am working on a WooCommerce project. I need to add some entry based on ordered item in my custom table. If user ordered 3 items then those 3 entry will be place along with some data in my custom …
MySQL query to get total item number from table 2 to owner in table 1?
I got 2 tables: Owners and Storage as below: Table: owners id | owner | box —————————- 1 | Nick | [] 2 | Jack | [] 3 | Jane | [] Table: Storage id …
PHP looping through a function before returning value
I have simplified this. I have this line of code in a method in a (codeigniter framework) controller: And this is is the ‘loop1’ function: What I need to be able to do is loop through loop1 function until certain conditions are met before then returning the results array. Problem is calling the fu…
how to make a query with database as a variable
I have two databases – lorem and nts.lorem – and need to operate with both of them everything works fine until db is a variable in an ajax request – for example: js php any help? Answer Choose connection according to $db value:
Get and display the tax rate on Woocommerce single product pages
I’m trying to find a way how I could only display the Tax rate (16% or 7%), which a product has. Basically the idea is that there should be a static tax like. The price includes 16% Taxes or The price includes 7% Taxes So the percent rate should be dynamic based on which rate the product has. Any idea
PHP – unable to echo variables $error and $successMessage
This is a form validation code. I have a bootstrap form but my alerts don’t show up for some reason. My form is here – https://trendingpunjabi.com/test.php. I am able to do form validation in javascript but want this to work as well. Answer I got my answer from other source. See the text that foll…
Symfony 5 Delete methods, Unable to guess how to get a Doctrine instance from the request information for parameter
I wanted to put in my controller a second delete button to delete comments but I got lots of error messages like the one from ParamConverter because it did not recognize the class. So in my controller …