Category "php"

How to disable Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result [duplicate]

For my PHP I get a warning message: Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in /var/www/scorebord/loader.php on l

I want to use codeigniter foreign character library in my custom PHP project how i can use it?

this is array of foreign characters how I can use it in my own project. $foreign_characters = array( '/ä|æ|ǽ/' => 'ae', '/ö|œ/' =

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

Component install error: JInstaller: :Install: File does not exist

I have created a component simply by following this video. I have created my component named admin.zip. I am getting this following warning while installing in

How can I easily switch between PHP versions on Mac OSX?

I would like to test my application on PHP 5.3 up to PHP 7.0. Where and how can I install the versions and how can I switch them by running a small script?

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

I set up a 19% standard tax amount in my Woocommerce Online-Shop. Unfortunatley - now there is a text "estimated for Germany" behind the (includes 20,12 €.

Using Associative arrays

I'm trying to access a position of a associative array which is inside of another array. Here is my array: Array ( [order_data] => stdClass Object

Illuminate\Database\QueryException could not find driver [duplicate]

Illuminate\Database\Connection::runQueryCallback C:\wamp\www\LaravelProject\vendor\laravel\framework\src\Illuminate\Database\Connection.php:67

Extract house numbers from address string

I am importing user data from a foreign database on demand. While i keep house numbers separate from the street names, the other database does not. I use preg

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

This question is turned into a Q&A, because I had struggle finding the answer, and think it can be useful for others I have a JavaScript array of value

Query with MySQL event

I try to perform this query with Zend DB: $this->db->query(" CREATE EVENT turn_tonormal ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVA

Match csv filenames to table names and import

I have multiple csv files generated everyday with same name and they should be imported to Mysql database . I can import a single file to table where I have def

Google Calendar API batch request PHP

i am trying to send a bunch of events via an Batch Request to Google Calendar. But i cant figur out how to do. https://developers.google.com/google-apps/calenda

Explain how this array transposing and flattening function works

Here this function in PHP that allows to merge any N amount of different length arrays in a fashion that output array will be in next order: Array1[0],Array2[0]

Natural ORDER in Laravel Eloquent ORM

How can i get 'natural order' in 'Eloquent ORM'? In table I have column 'text' (string). Normal order: Model::orderBy('text') 'value 1' 'value 12' 'value 23'

PHP web3 ERC20 token function call

I have a Smart Contract that represent ERC20 token. I already deployed the smart contract on Binance Testnet using HardHat. I have a deployed Smart Contract add

CodeIgniter 4: Like and Dislike Functionality

I have implemented the following like/dislike code inspired by Code with AWA. EDIT I'm using CodeIgniter now if that changes anything. I have updated my questio

Boolean assignment operators in PHP

I find myself doing this kind of thing somewhat often: $foo = true; $foo = $foo && false; // bool(false) With bitwise operators, you can use the &

Mysqli Output to a table

So my goal is to output some mysql info to a table. I want it to start a new column every 18th record. Here is my current code: $hostname = "localhost"; //SET