Assuming that both arrays have the same number of elements, you need to create a way to iterate through these arrays and use the iteration index to use data from each array.
If you use array_map
nor do you need to know the iteration index and you can mix both directly like this:
function misturar($nome, $perc){
return $nome.' - '.$perc.'%';
}
$c = array_map("misturar", $corretor, $comissao);
echo implode($c, ' | ');
Example: link
Although in this case find it simpler with array_map, you can also do this:
$res = '';
for ($i = 0; $i < count($corretor); $i++){
$res.= $corretor[$i].' - '.$comissao[$i].'% | ';
}
echo substr($res, 0, -3);
Example: link