本文介绍了如何在此程序中打印密钥的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我是编程的初学者 如何在此程序中打印密钥的值?我也收到通知未定义的偏移量:第12行和第18行的4 我尝试过的事情: BARCELONA, GER => BAYERN, POR = > BENFICA, ENG => CHELSIA) ; $ TEAM = array( ESP => ATLETICO, GER => LEVERKUSEN , POR => PORTO, ENG => ARSENAL, ESP => REAL MADRID); $ A = array_keys($ CHAMP); $ B = array_keys($ TEAM); for ($ i = 0 ; $ i < 1; $ i ++) { for($ j = 0; $ j< = count($ TEAM); $ j ++) { if($ A [$ i] == $ B [$ j]) { shuffle($ B); } else { print_r($ B [$ j]); } } } ?> 解决方案 TEAM = array( ESP => ATLETICO, GER => LEVERKUSEN, POR => PORTO, ENG => ARSENAL, ESP => REAL MADRID); A = array_keys( CHAMP); i am beginner in programing How can i print the value of the key in this program? i am also getting the notice as "Undefined offset: 4 in line 12 and 18"What I have tried:"BARCELONA", "GER"=>"BAYERN", "POR"=>"BENFICA","ENG"=>"CHELSIA");$TEAM = array("ESP"=>"ATLETICO", "GER"=>"LEVERKUSEN", "POR"=>"PORTO","ENG"=>"ARSENAL","ESP"=>"REAL MADRID");$A=array_keys($CHAMP);$B=array_keys($TEAM);for ($i = 0; $i <1; $i++) {for($j=0;$j<=count($TEAM);$j++){if($A[$i] == $B[$j]){shuffle($B);}else{print_r($B[$j]);}}}?> 解决方案 TEAM = array("ESP"=>"ATLETICO", "GER"=>"LEVERKUSEN", "POR"=>"PORTO","ENG"=>"ARSENAL","ESP"=>"REAL MADRID");A=array_keys(CHAMP); 这篇关于如何在此程序中打印密钥的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-18 11:50