Home > Article > Backend Development > Problems when using references in php foreach loop_PHP tutorial
This article will introduce to you the analysis and precautions for using references in the PHP foreach loop. I hope this article will be helpful to all students.
Example
The code is as follows
|
Copy code
|
||||
$array=array('a','b','c','d');
//do something |
echo $kay;//output 3