I have 2 dimension array. I would like to get each value of array. I tried this, but each array in $Name has all the array in $Date. But my expectation first item in $Name equal to first item in $Date. This is my expectation result:
A\11
B\12
C\13
$Name = @("A", "B", "C") #the size of this array not fixed
$Date = @("11", "12", "13") #the size of this array not fixed
foreach ($na in $Name)
{
foreach ($dt in $Date)
{
$NameAndDate = "$na\$dt"
Write-Host $NameAndDate
}
}
but from the code above I got this result
A\11
A\12
A\13
B\11
B\12
B\13
C\11
C\12
C\13
Anyone can help, please. Thank you