Category "php"

Filter all row with the same foreign key when a those column is null in laravel

i have table schema in mysql for my project. this project build with laravel and as you can see in the below image i want to fillter all row with the same store

How to deal with mysqli problems? mysqli_fetch_array(): Argument #1 must be of type mysqli_result

In my local/development environment, the MySQLi query is performing OK. However, when I upload it on my web host environment, I get this error: Fatal error: Ca

Symfony- docker container Could not open input file: bin/bash

I started my Symfony 6 project with Docker successfully. I have a problem when accessing the PHP container and trying to run php bin/console doctrine:migrations

How I use return inside a recursive functions in php

I have a php recursive function as shown in the below: function displayDropdown(&$catList, $parent, $current=[], $level=0) { if ($parent==0) { foreac

Is it possible to use amCharts5: Simple Pie Chart, but not with percentages?

I started using this library, and I liked it. I was wondering if anyone had the need for instead of showing the data in percentage, to show the real data withou

How to apply different and/or groups for multiple filters in PHP GA4?

I have to pull data using mutiple dimension filters using AND/OR operators in php GA4. How to apply AND operator for the below dimension filters - 'dimensionFil

Unable to retrieve data from parent form in InlineCreate operation in backpack for laravel

I implement the InlineCreate Operation in Backpack for Laravel and works fine, but my field depend of other field and I can't to get the parent field informati

How to simulate api calls in C# using php file

I have an online reports viewer application that stores patients records as follows: Web application view: I have created a C# application that is meant to cap

Insert into multiple input fields using select2 and ajax in laravel

I am trying to use a single select request to retrieve data from database based on the search term "name" and populate my input fields using select2 so that i d

Laravel "Skip" WhereIn when request not Filled or null?

I have controller with request like below $product = $request->product; //array $product_category = $request->product; if($request->filled('product'))

How to write rendered content between<pre><code> to a file

I have a file main.php with code snippet as <pre><code> echo htmlspecialchars ('echo "this is a $name of your best friend";'); </pre></c

What is faster in PHP: dechex() or sprintf("%x")?

What is the fastest way to convert a number to the hexadecimal representation in PHP: dechex($number) or sprintf("%x",$number)?

Laravel Excel beforeExport event to load excel from aws s3 bucket not working

I am using matwebsite Laravel excel to do some updates in existing excel and export. I am using beforeExport method to do some updates in the excel. when i prov

Sort ServerSide DataTable on calculated / formatted value that is not a column in the DB

I've been using Laravel Datatables for awhile in some of the Laravel applications and I really love that, and probably using a fraction of the features. I also

The matching algorithm for hashing passwords

So my question is : How does hashing algorithms actually check if passwords match because they generate a new password every time. Let's suppose I have a passwo

image uploads but won't display php

I successfully can upload the image into MySQL but when trying to display the image from the MySQL they appear broken. $image = $_FILES['image']['tmp_name'];

Image Not visible In TCPDF

here I have a Data i need it in Pdf But image not showing Below are my code i already stored data in a variable $signature= $_POST['signature']; $tbl = '<

WooCommerce - Get Price Total as number

I'm a newbie, and I have this problem as it shows me $0.00 on the Order received page. // Add Custom WooCommerce Checkout Message add_action( 'woocommerce_thank

How to pass calculated/final value of one function to other functions in a controller of Codeigniter application

Using sessions we can achieve this, but need this without sessions or cookies. <?php class Employees extends CI_Controller { public f

PHPSocket.io emit message from PHP to PHP

I'm trying to emit message from PHP code to websocket server built with PHPSocket.io Emitter code: <?php require_once __DIR__ . '/vendor/autoload.php'; $emit