Category "php"

How to put multiple parameters in one $ [closed]

Sorry if this is very obvios I have the following $a = 1200.00 $b = 675 $c = 123.00 $d = $a$b$c How would I properly write $d I thought it w

Using this JS function, how can I store in a SQL database TMDB fields?

I'm currently developing a project that will be Client on Java and Admin on PHP. For this purpose, I would like to store the API's data in a SQL database, so th

How to foreach categories from 3rd index from my database / Laravel?

I am issuing a problem with the following: I foreach-ed my categories from index 1 to 3 in my blade file. Code @foreach($categories->take(3) as $category) &l

Apply function to every element of a multidimensional array

I have a multidimensional array like this (please ignore the strlen): array(2) { ["document"]=> array(16) { [0]=> string(14) "Value1"

mongodb & php: how can I store and callback a custom js function to parse data?

Before to submit the doubt that I have, let me start from preamble that I'm definitively a newbie on MongoDB world ;( but I'm going to learn quickly! The goal t

PHP inserts weird symbols instead of polish letters [duplicate]

When i'm inserting data from mysql database using this code it doesn't fill polish letters instead it shows random weird symbols instead of po

Why do I get an error on header redirect?

I am writing a code where I want to check if the user is logged in and, if yes, redirect the user to the profile page. Else, redirect the user to the login page

I need to use a boolean column from my database that is set a 1 or 0 to change the look of one of my articles in my web page

Sorry if the title is a little confusing was trying not to make it too long. I am currently in school and my teacher has tasked us with this "Add a boolean colu

WordPress Loop Post Counter Never Changes

I want to style the first post differently so I am trying to use a simple counter that will add a class to the first post. First, on index.php I have this if (

Got error 'Primary script unknown' with Apache alias outside document root

I've setup an Apache alias on a subdomain, which points to a directory outside the document root like this: Alias / /home/keyhelp/www/webmail/plugins/xcalendar/

What "appropriate source of randomness" in php random_int means?

I was writing some PHP code when I came to an warning in my coding saying "Unhandled Exception" pointing to the use of random_int in some part of my algorithm.

How to combine lines of code into one line?

I have 2 lines of code here but i want to combine all 2 lines into 1 // How to combine these 2 lines here $product = $this->productService->searchProduct(

ERROR LARAVEL EMAIL: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1

Greetings to the community! I have recently developed a web page with Laravel 9.X, which works correctly in local, but when I upload it to my Host, I am having

How to get Enum values Array in PHP

I have Enum Class. <?php namespace Enum; enum Status:string { case ACTIVE = 'active'; case ARCHIVE = 'archive'; case INACTIVE = 'inactive'; }

How to take a JSON content and return it in a wordpress function (php)?

I have a wordpress endpoint and I have some json data. Unfortunately I dont know how to return this json data in the function. I tried json_decode but it doesn'

Filter my select options by department and location

I have a problem in my website, I have 2 dropdown selects that are Departments and Locations, my problem is when I select a certain department and start typing

Codeigniter - foreach form input table

I have a foreach loop contained within a form there an input is required. I want to submit these all of input values to the database. Currently it only submits

GET not able to find URL

I have made a basic Laravel project and had configured my api.php file to have a GET route when I want to fetch data for my project, but whenever I try to load

WooCommerce Subscriptions automatically change status of manual recurring orders to processing

I am using WooCommerce Subscriptions with manual payments using the 'bacs' payment method. When recurring orders are created, the code below changes the status

How to forward email body without any change

Need to Forward raw Email without any change Working on an email forwarding script and implementing SRS with keeping DKIM intact (for DMARC). I have Laravel app