The poster has done too much research, maybe the keyword description is incorrect and no corresponding explanation was found.
I will post the picture first:
That’s about it, why can print_r output, but there is no output in echo? Good people have a safe life, maybe I don’t understand the scope well...
电动小老虎2017-11-17 00:04:50
each can traverse the array and then assign the array to a variable. Then the variable becomes an array. list can turn the elements of the default index array into variables such as $arr= range(1,3) list($a,$b,$c)=$arr echo $a,$b,$c is 1,2,3 That's probably what it means.
adolphe_ss2017-11-16 21:12:32
<hr size="5px" width="90%"/> <?php static $arr = array("张三","李四"); $name = each($arr); print_r($name);echo '<br />'; $name = each($arr); print_r($name);echo'<br />'; ?> <hr size="3pt" color="green" width="50%" /> <?php print_r($arr); //$arr =array("张三","李四"); list($key, $value) = each($arr); echo "$key=>$value"; ?>
Attachment: The code of Figure 2.