189 8069 5689

PHP数组foreach追加值

$shop = array(
  0=>array(0=>1,1=>2,2=>3,3=>4)
  ,1=>array(0=>1,1=>2,2=>3)
  ,2=>array(0=>1,1=>2,2=>3)
  );
foreach($shop as $key=>$shoplist){
  $index = count($shoplist);
  $shoplist[$index] = '4444444444444';
  $shoplist['we'] = '欢迎光临脚本之家';
  $shop[$key]=$shoplist;
}
print_r($shop);

当前名称:PHP数组foreach追加值
路径分享:http://cdxtjz.cn/article/goegog.html

其他资讯