my php is update from php 5.4 to php 7.0.33 , but php code get an error with Dynamic variables php 5.4 some code like this… when I use in php 7 shome code get epmty, how can I do to resolve this problem I already watching the refer page Using braces with dynamic variable names in PHP , but
PHP not executing a shell exec command
To keep this simple this code works: And this code code doesn’t: Does anyone know how I can get the code that doesn’t work to work? I have ran the command in a normal terminal and they execute as expected, but when ran with PHP it cause a server 500 error – this seems to require a PHP code review
Creating JSON Array out of PHP loop
in my current project I want to fill a bar chart with summed data for each day of a month. I get the required values from the database, but I can’t get the array created in the right format. So far, the individual values are just lined up and I can’t read them out in the JS. I have tried
Find all descendants in array
At first look it was a simple task, but when I tried to solve it I became confused. I have PHP array, where keys are top parent IDs, values are child IDs. Some child IDs have their own children. That children may have own children and so on. My goal is to get a new array, where all top parent
PHP form validation not functioning having copied the tutorial code
I am hoping the community can give me a little insight into what is not working with my code, I am following a Udemy course. I have followed the accompanying video which developed an undefined variable error, which after doing some research I believe I have fixed by declaring variables as empty strings being able to be over-ridden by the
Input Field to Laravel save: store datetime when adding just the date
Goal: have two columns (datetime) save an input field that only takes in date I would like the start date to save 11/11/2021 00:00:00 and the end date 11/12/2021 23:59:59 (only the date can be changed) from a text field that a user can only place a date in the text field: snippet of my store function: the code above
Setting up PHPunit – PHP CLI is not executing the shell script
I’m in a multi developer program. The other developer installed PHPUnit via composer and successfully is running tests. I took the composer files, ran composer update, but when I try to run the tests, I am receiving this error: Output: This is the content of the phpunit shell script. The shebang first line #!/usr/bin/env sh is not being output, but
How to sort numbers containing current year in prefix
I am having trouble sorting the job numbers in my project. My client requirement is to store the job numbers in the below format:- For example:- The current year is 2021 so the job number will be like this:- When the year changes it should start again from 1 and so on for the next year. For example:- I had
How to annotate Laravel Collection elements during iteration
I was thinking about how to annotate types in PhpStorm. I believe PhpStorm is using Psalm to resolve types, but I can’t find how to annotate type to get suggestions here: $row in my app will always be Collection object and I want to have it marked somewhere here with annotations. Does anyone have an idea how to accomplish that?
PHPMailer won’t send html message with media queries [closed]
I am using PHPmailer to send emails. php 7.4 phpmailer 5.2 thunderbird – emailclient 78 tiny for email body UPDATE 1 both tiny and thunderbird for security reasons removes @media I have a responsive …