$cars=array("Volvo"=>10,"BMW"=>5,"SAAB"=>23);___________可访问"BMW"对应的元素
举一反三
- $cars=array("Volvo","BMW","SAAB",10,3.14,true); 如果访问其中值为10的这个元素,访问方式是$cars[ _____ ]?
- $cars=array( array("Volvo",22,18), array("BMW",15,13), array("Saab",5,2), array("LandRover",17,15) );
- php[br][/br]$cars=array("Volvo","BMW","Toyota");[br][/br]echo "I like " . $cars[0] ;[br][/br]?>[br][/br](5.0) A: Volvo B: BMW C: Toyota
- var x;var mycars = new Array();mycars[0] = "Saab";mycars[1] = "Volvo";mycars[2] = "BMW";for (x in mycars){console.log(mycars[x]);}程序的运行结果是? A: SaabVolvoBMW B: Saab C: BMW D: 012
- $cars=array(array("Volvo",22,18),array("BMW",15,13),array("Saab",5,2),array("Land Rover",17,15)); A: 内外层都是索引数组 B: 内层是索引数组,外层是关联数组 C: 内层是关联数组,外层是索引数组 D: 内外层都是关联数组