PHP 将二维数组中某列值作为数组的键名

$priceArr = array_column($priceArr, null, 'id');//把id当作key值直接获取即可

猜你喜欢

转载自www.cnblogs.com/ghjbk/p/12198197.html