php二维数组循环
操作方法
- 01
以上就是达内IT培训集团为大家总结有关php二维数组循环的相关知识,希望大家喜欢。 print_r($order_data_info);Array([0] => stdClass Object ( [countOrder] => 3 [amntTotal] => 2380.00 [name] => 测试版 )[1] => stdClass Object ( [countOrder] => 1 [amntTotal] => 2380.00 [name] => VIP版 )[2] => stdClass Object ( [countOrder] => 2 [amntTotal] => 4760.00 [name] => 个人版 ))$order_length = sizeof($order_data_info);for($i=0;$i<$order_length;++$i){ $order_data_info[$i]->amntTotal = money($order_data_info[$i]->amntTotal);}print_r($order_data_info);Array([0] => Array ( [countOrder] => 3 [amntTotal] => 2380.00 [name] => 测试版 )[1] => Array ( [countOrder] => 1 [amntTotal] => 2380.00 [name] => VIP版 )[2] => Array ( [countOrder] => 2 [amntTotal] => 4760.00 [name] => 个人版 ))$order_length = sizeof($order_data_info);for($i=0;$i<$order_length;++$i){ $order_data_info[$i]['amntTotal'] = money($order_data_info[$i]['amntTotal']);}以上就是达内IT培训为大家总结的有关php二维数组循环的相关知识,希望能够帮助到大家,同时也希望大家能够关注达内培训。