Category "php"

Transpose multidimensional array and join values with commas

How to group by comma of every value as per same key? I need to re-orientate the array so that rows become columns and the new rows need to be joined together

PHP Shell EXEC with Plesk

I made a SH script to add Plesk subscription (newplesk.sh) I need this script to be started from a PHP file. It's working through SSH when typing php testplesk.

Declaration of OM\Db::query(string $statement) must be compatible with PDO::query

I just installed PHP 8 and I have this error appears? How do I fix it? Fatal error: Declaration of OM\Db::query(string $statement) must be compatible with PDO:

To call class only once in laravel

I have laravel application and I have used singleton pattern public function boot/register() { $this->app->singleton( 'className',

Star and Half Star Rating in Laravel

I want to display average product ratings in star. The values are displaying good but I want to show half star if the value is in float. My blade view: <div

Laravel 8 factory state afterCreating

Laravel 7 factories had method afterCreatingState() where you could define what should happen after Model with specific state was saved into database. $factory-

echo language construct is discouraged. (PHP)

why codacy(code review tool) showing "echo language construct is discouraged." how to solve this issue. 1:

How do I call a php file with axios?

I am doing a CRUD with vue.js and php. I installed the axios and I believe it is working. I just don't know how to call the php file that connects to the databa

Laravel Model save() & update() Not Saving

Laravel 5.7 Hello I have been looking through stack overflow and have tried many possible answers and have come to no conclusions. I am updating a simple inte

Don't show recurring price for WooCommerce subscriptions worth 0$

I want to modify the subscription string so it only shows the sign-up fee for variations with 0$ recurring fee. I would also like to show that variation price

Elephant.io server error with Php( An error occurred while trying to establish a connection to the server)

I have a question for you, I'm using socket.io and elephant.io in my php application, but I've been dealing with the error I got by elephant.io for almost 2 day

bitrix d7 route parameters

I am working on project which is based on BITRIX D7 php framework. We have a need to combine several URLs into one by passing the desired part as a parameter in

Google Gmail API - How to login programatically?

I'm looking to write a PHP script that scans my gmail inbox, and reads unread emails. There needs to be NO user interaction. This has to happen on a cronjob tha

Localhost is currently unable to handle this request. HTTP ERROR 500 with laravel app in Win 10

I have imported Laravel app inside my PC (Win 10) and put it in htdocs folder then I have changed the default directory which will serve me when type "localhost

How to save Multiple Images from frontend form in ACF Repeater Field in my Post Wordpress

There is my code in this code i insert data to post by frontend html form. i insert post title, description, featured image and ACF textfields. and Gallery imag

Incorrect display of xml file sitemap in browsers(php)

Create sitemap on php language. If don't add element xmlns:xhtml="http://www.w3.org/1999/xhtml" in urlset and xhtml:link after , sitemap is displayed correctly.

Passing a boolean value from checkbox in Laravel form

I am trying to save boolean value when I create a new Post and then have it update the value if I update the Post. When I create a new Post and save, it persist

i want condition active page/or open post page, title not show in sidebar

i want condition active page/or open post page, title not show in sidebar <?php $the_query = new WP_Query( array('post_type' => 'courses')); ?>

Sending data from LMS Moodle (php) to python CGI script and get it back

I installed Learning Managment System (LMS) 'Moodle' to XAMPP local server. And there is instrument for file downloading, called "filepicker". I want to pass te

PHP Laminas DoctrineObjectInputFilter get value of other property in Callback input filter

I am working with Laminas DoctrineObjectInputFilter and want to get value of other property in Callback input filter like this code is in init function of Filte