Home > Article > Backend Development > Strict Standards: Only variables should be passed by referen_PHP教程
This article will introduce to you the solution to Strict Standards: Only variables should be passed by reference in. Friends can refer to it.
Use the built-in reset function in php to get the value of the first element of the array. For example:
The code is as follows
|
Copy code
|
||||
echo reset($arr);
| //The output result is one. For the following code, if "Strict Standards" is turned on in PHP, you will see the prompt "Strict Standards: Only variables should be passed by reference in".
The code is as follows |