Reputation: 45
I got two variables, filled with:
$Var1:
Dog
Cat
Bird
$Var2:
makes wau
makes miau
makes beep
How can I mix both of them like:
$Var3 Dog makes wau Cat makes miau Bird makes beep
$Var3 = $Var1 + $Var2
dosen't work
Upvotes: 0
Views: 48
Reputation: 60910
this is a rapid way (variables's lenght must be equal):
$i = 0 ; $var3 = $var1 | % { "$_ $($var2[$i])"; $i++ }
Upvotes: 1