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://azwzsj.com/article/goegog.html