Skip to content
Advertisement

from php 5.4 to php 7 , useing dynamic variables is confused

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

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

Advertisement