search

Home  >  Q&A  >  body text

array_walk() can’t understand

array(3) {
["a"]=>
string(8) "wuyanzhu"
["b"]=>
string(13) "huangxiaoming"
["c"]=>
string(8) "ninzetao"
}
a ---WUYANZHU
b ---HUANGXIAOMING
c ---NINZETAO
The effect after executing the custom function test_print: array(3) {
["a"]=>
string(8) "wuyanzhu"
["b"]=>
string(13) "huangxiaoming"
["c"]=>
string(8) "ninzetao"
}


strtoupper(); Convert string to uppercase; ——Why is the previous a not changed to uppercase?

array_walk(); I don’t understand this function. What do $item2 and $key mean and what do they do?


益伦益伦2655 days ago1325

reply all(2)I'll reply

  • 寻觅 beyond

    寻觅 beyond2017-10-17 21:52:40

    Read the manual. The manual is easy to understand, but you must first know the callback function

    http://php.net/manual/zh/function.array-walk.php


    reply
    0
  • Cancelreply