迭代多维 php 数组以通过邮件发送

Iterating muldimensional php array to send by mail

我需要发送一封电子邮件,其中包含来自 $_SESSION

的数据

我有这个数组:

Array ( 
[libelleProduit] => Array 
( [0] => MN 25551 [1] => WHX 4509 [2] => TV15751  [3] => BO22451 )
 [qteProduit] => Array 
( [0] => 1 [1] => 2 [2] => 6 [3] => 1 ) 
[prixProduit] => Array 
( [0] => 189 [1] => 206 [2] => 530 [3] => 375 )

如何循环遍历此数组以获取所有已发送的数据? 我需要能够发送这样的内容:

参考号:MN 25551 数量:1 价格:189

参考:WHX 4509 数量 : 2 价格:206

参考:TV15751 数量 : 6 价格:530

参考:BO22451 数量 : 1 价格:375

$data = '';
$info = [ 
    'libelleProduit' => [
        0 => 'MN 25551',
        1 => 'WHX 4509',
        2 => 'TV15751',
        3 => 'BO22451',
    ],
    'qteProduit' => [
        0 => 1,
        1 => 2,
        2 => 6,
        3 => 1,
    ],
    'prixProduit' => [
        0 => 189,
        1 => 206,
        2 => 530,
        3 => 375,
    ],
];
foreach($info['libelleProduit'] as $key => $val) {
    $data .= 'ref : ' . $val . ' quantity: ' . $info['qteProduit'][$key] . ' price: ' . $info['prixProduit'][$key] . "\n\n";
}

mail($to , $subject, $data);