Category "php"

Divide/Split an array into two arrays one with even numbers and other with odd numbers

Please see my script, and identify the issue. Trying to Split an array into two arrays by value even or odd without built-in functions in PHP <?php $array =

php list files to array and save array stringified to disk [duplicate]

In my web app I want to list in php the contents of a directory "archives/*-pairings.txt" So I have a php file (below) that is supposed to rea

How to output sql date row to time elapsed

I have table with row id, name, created_at and I want to output the created_at row as timestamp time ago in php

problem to do a post at soap service from php soapclient

i'm a new using soap services, so i have a problem when i consume a soap service using soapclient in php. this is the request at soap: <x:Envelope xmlns:x="h

Upload a pdf file in core php

//=============== PDF File Upload===================== if (isset($_FILES["pdfile"])) { $filename = $_FILES['pdfile']['name']; $dir = "../pdfs/st

How do I use fetchAll in php?

I am using this statement to fetch the elements in a column in my db $result = $stmt->fetchAll(PDO::FETCH_COLUMN, 0); but I get this error when trying to

Create new productpage when new database entry

How can I create a new page when I enter a new product in my database, or hide the parameter inside a normal /.../ ? In this example I will sell Sandles with th

Consent is required to transfer ownership of a file to another user [Google Drive API]

I have a Google Sheets file shared with 1 user - owner (Gmail account) and 2nd user - writer (google service account like @iam.gserviceaccount.com). I use this

Number to Excel column name conversion

In Excel, column names are characters from A to Z, if there are more columns needed, it continues with AA, AB ... I want to write a function, that converts inte

Would like to write a javascript that helps me to find documents in a folder

I would like to write a js for an offline website (located on a local Windows server or any other server). It's supposed to look for files like PDFs in several

Warning: count(): Parameter must be an array or an object that implements Countable in Magento 2.4.3

protected function _saveAppliedTaxes( Address $address, $applied, $amount, $baseAmount, $rate ) { $previousl

php HeadlessChromium\BrowserFactory not found in file.php

<?php use HeadlessChromium\BrowserFactory; $browserFactory = new BrowserFactory(); ?> I've installed chrome-php/chrome with composer and hovering my mo

How to upload a video using ACF in WordPress?

I am still at learning phase in WordPress. I cannot figure out in ACF which field type should I choose to upload a video file and which code should I write to s

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

How can i configure Workerman works through wss with nginx?

I just started to learn websockets with "Workerman" library on my nginx server, and i ran into a problem. I tried some examples, so I think I almost made it. I

Named Routes in Symfony 6 with controllers in inner directory

I moved all my controllers to /src/Web/Controller in my Symfony 6 project like follows ├── src │ ├── ... │ &

What is the equivalent of this php code in Nodejs?

I have this php code to encrypt and decrypt with RSA, I use only the encrypt data, because I need to decrypt the data with Node.js <?php include 'vendor/auto

Creating Sticky Navbar with Drop Down Menu HTML

I am creating a HTML web page which contains a sticky navbar with drop down menu. However, when I created one, the dropdown menu does not works in the sticky na

delete a table form a database using laravel command

i need to delete a database table using laravel artisan command . not like this command php artisan migrate:rollback --step=5 i need to create like this route o

error showing when starting xampp after changing the hard disk to ssd

I have been running xampp from D drive well. Recently I have changed my hard disk to ssd. After then I can not run the xampp. I have checked the port that is wr