The execution order of the dividing line
Lost
Lost 2018-03-21 15:03:45
0
5
1250

Shouldn’t the code in the function body also be executed in order? Why is the dividing line executed first in the second brother foreach, and executed twice

Lost
Lost

reply all(1)
sky

Where is the code?

  • reply foreach($data as $value){ //The first loop assigns the country array to $value //The second loop assigns the array of Chinese provinces to $value //Therefore, I traverse $value again when looping foreach($value as $k => $v){ echo $k . '-----' . $v .'<br />'; } //In order to see it more clearly, I added a gorgeous dividing line in the middle to facilitate your analysis. echo '----------Separating line-----------<br />'; }
    Lost author 2018-03-21 15:18:30
  • reply I can't see your overall code clearly? Is your $data a two-dimensional array?
    sky author 2018-03-21 15:35:10
  • reply It's two-dimensional, it's the code in the tutorial
    Lost author 2018-03-21 15:55:24
  • reply I really don't understand what you want to do
    sky author 2018-03-21 17:18:55
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template