Each PHP
Error message
Warning:call-time pass-by-reference has been deprecated; If you would a-pass it by reference, modify the declaration of each (). If you would as to enable Call-time pass-by-reference, you can set Allow_call_time_pass_reference to true in your INI fi Le in D:\APMServ5.2.6\www\htdocs\base\admin\config.php on line 23
Parse error:syntax error, unexpected ' [' D:\APMServ5.2.6\www\htdocs\base\admin\config.php on line 23
Error Location Code
if ($step = = "Modify") { $var = $_post[' var ']; Do { $val = each (& $var) [1];//error $key = each (& $var) [0];//error if (each (& $var)) { $msql->query ("Update {P}_base_config set value= ' {$val} ' where variable= ' {$key} '"); } } while (1); Sayok ($strConfigOk, "config.php", "");}
Reply to discussion (solution)
Why do you write it like this?
$val = each (& $var) [1];
$key = each (& $var) [0];
Isn't that okay?
$val = each ($var) [1];
$key = each ($var) [0];
Writing like this is not better?
List ($key, $val) = each ($var);
Why do you write it like this?
$val = each (& $var) [1];
$key = each (& $var) [0];
Isn't that okay?
$val = each ($var) [1];
$key = each ($var) [0];
Writing like this is not better?
List ($key, $val) = each ($var); So the environment is jammed.
There's no reason!
You can't just change it because you have a problem with your program.
The reason for each (& $var) error is that you can't pass a reference like this, which is a convention with PHP 5.3
each ($var) [0] is written in PHP 5.3.
If you're stuck with the grammar rules of PHP 5.3, you're going to have to figure out where your problem is.
There's no reason!
You can't just change it because you have a problem with your program.
The reason for each (& $var) error is that you can't pass a reference like this, which is a convention with PHP 5.3
each ($var) [0] is written in PHP 5.3.
If you are stuck with the grammar rules of PHP 5.3, then you have to think about where your problem is. Oh, my production environment is php5.2.6, this follows the list ($key, $val) = each ($var);
does while (1) infinite loop does not exit the statement, why does not card?
Then you print_r ($_post[' var '); Post the results
does while (1) infinite loop does not exit the statement, why does not card? Hero help, just getting started how to quit
if (each (& $var))
{
$msql->query ("Update {P}_base_config set value= ' {$val} ' where variable= ' {$key} '");
Break
}
So we can quit.