Category "php"

How to get every words before () in a string

How can i get every words before the word inside a () $str = "There are some (Cat) which are wild"; $str = "Animal (Cat) is a domestic pet"; echo implode(" ", a

is there a way to put placeholders in excel files using phpspreadsheet?

is there any way to get placeholders in my excel file using phpspreadsheet? all I see I can do is using a specific cell to put my data into it eg. setCellValue(

How remove part of url from browser with htacess

I have 2 domains in the same hosting, inside the folder public_html stay the folders and the index.php from the domain principal and inside the public_html have

How to extract value from nested cURL

I'm trying to extract the data from (php)cURL response that I received from the external api. I received the response like below. {"result":"OK","data":{"body":

When using the substr() string function, Why is a litteral carriage return twice as long as a line feed character "\n"?

When typing the following code ... (easily testable with W3schools' editor) <?php $basecss = '.class { margin-bottom:0 } /*1234567890'; $basemincss = ".

PHP autoloader cant find necessary class

So I am learning PHP MVC for the first time, and i came up to a term - autoloading all the required .php files. So I searched the web for some examples, and mad

I am using PHP Chrome HTML 2 PDF but unable to use Header and Footer in the PDF

Please find the below code: <?php use Spiritix\Html2Pdf\Converter; use Spiritix\Html2Pdf\Input\StringInput; use Spiritix\Html2Pdf\Output\DownloadOutput; requ

http to https and www to non-www not working correct with laravel 8 URI links

I searched a lot of about this topic to redirect all urls to https://my-domain I want delete the www and add https. I found a lot of answers this one work good

No alive nodes. All the 1 nodes seem to be down

I am trying to use Elasticsearch 8.1 using laravel. My elasticsearch instance is running at port 9200. https://localhost:9200 returns me { "name" : "node-1",

phpmyadmin not opening due to change in config file

I was trying to upload a large .sql file which have more than 14000 rows. which caused the error maximum execution time when importing .SQL data file . Then I s

Adding array of value in javascript

I'm asking this question again and hope I get the answer this time, I have an array of number that adds and subtract on button click which works withonclick and

Moving parts of {token} to the end of line based on condition

From a multiline input I want to move tokens if they're inside {} and match some number. Sample input # (811) (1485) [2756] {29} [555] {15} # (811) (1476) {20}

echo variable in window location not working

im trying to redirect a user to a url with a php variable $userdata However the script seems not to work, it does put it in the html (confirmed with inspect ele

DBMS ERD Design

I am planning out an application's database. I have an employee table. I want to store every employee's education degree. Adding an education column to the empl

Is there any way to access a Symfony secret value in userland code?

Despite making them appear to be environment variables, Symfony does not actually load secrets into the environment, so you can't access them via getenv() or $_

Only display Woo Commerce sub-categories based on selected Parent Category in a wordpress widget sidebar

I have a WordPress sidebar that I want to only display the children of the parent category. My structure is as follows All Products > Parent Category > Ch

Woocommerce how to add account details to billing address automatically

I would be much grateful if you help! I have custom registration fields that are correctly saved in database and are accessible through: $user->['users_tel']

Google My Business Information API - Get locations list of the authenticated account with php library

I'm currently working with Google API through this great php library but it doesn't support the last API and most of his method are going to be deprecated. I al

Laravel 8: How to set default value of all enum values

I want to assign all default values for allowed_file_types column in products table which are all values of enum FileTypes. But now I have no way to do that. Ca

Authentication Api using user name and password in flutter web

I try to authenticate api using user name and password it worked good in flutter android app but in flutter web do not get any data below my authentication func