我有一个二维数组,其中一部分看起来像这样($ arr是主数组):
$arr = array(
array("id" => "61","name" => "Алла","surname" => "Сарычева","patronymic" => "Игоревна","math" => "45","russian" => "69","informatics" => "56",),
array("id" => "63","name" => "Элина","surname" => "Ахильгова","patronymic" => "Алисхановна","math" => "33","russian" => "73","informatics" => "52")
)
主数组中大约有500个子数组,我只想输出$n
个子数组。我想知道for循环是否是解决此问题的最佳决定,还是有些怪异的array_map
操纵或类似的操作比使用for循环执行任务更快。
非常感谢大家的帮助。
答案 0 :(得分:0)