I need help of combination of two arrays in php.
What I have:
numbers = array(1, 2,3,4,5,6);
letters = array(\'q\', \'w\', \'e\', \'r\');
$numbers = [1, 2,3,4,5,6];
$letters = ['q', 'w', 'e', 'r'];
$count = 0;
$combination = array();
foreach ($numbers as $num)
{
$val = '';
if (isset ($letters[$count]))
{
$val = $letters[$count];
}
$combination += array($num => $val);
$count ++;
}
foreach($combination as $n => $l)
{
echo $n . $l . "
";
}