View Single Post
Old 01-03-2009   #3 (permalink)
Kryten


 
 

Re: output multiple arrays to file

Ahem. Or even:-

$a = 1..10 ; $b = 11..20 ; $c = 21..30
foreach ( $i in (0..($a.count -1)) ) {
Add-Content -path "arraytest.txt" `
-value "$($a[$i])`r`n$($b[$i])`r`n$($c[$i])"

}

Cheers,
Stuart

My System SpecsSystem Spec