So I got the following code which was working totally fine in php 5.6:
<?php
$post = array();
$team = array();
$priority = array(
"normal" => "",
"low" => "",
"high" => "", ...
However, I recently got a new server which is running php 7.0, and my script does not work at all. Everything after the first =>
is output as plain text.
I tested this with another array i called $testarray
. So the code is:
$post = array();
$team = array();
$testarray = array(
'test' => 1,
'asdf' => 2
);
$priority = array(
"normal" => "",
"low" => "",
"high" => "", ...
The output in that case is:
1, 'asdf' => 2 ); $priority = array( "normal" => "", "low" => "", "high" => "", ...
So obviously, php7.0 has troubles with processing this associative array. I know that the code is valid since it runs perfectly fine on my localhost which is still running php 5.4. I also don't want to downgrade now because I really like to be up to date with modern technology. And I really doubt php 7.0 does not support associative arrays anymore.
What to I have to do in order to run the above code properly?