I have this code in Powershell:
for (($i = 0), ($j = 0); $i -lt 10; ($i++))
{
$i
$j
$a2[0+4]
}
How can I make the variable $a2 get +4 every time? Now it happens only once, the variable $a2 contains the text
Above is the code I tried
UPD1:
$a2 contains:
id1
title1
Description1
Rew1
id2
title2
Description2
Rew2
id3
title3
Description3
Rew3
id4
title4
Description4
Rew4
id5
title5
Description5
Rew5
....
I am trying to process all the data from $a2 in +4 increments $a2[0+4] $a2[1+4] $a2[2+4] $a2[3+4]
UPD2:
I really don't need the variables $i and $j, I'm just trying to create a loop and found a suitable method on the internet
When I use
for (($i = 0), ($j = 0); $i -lt 10; ($i++))
{
$a2[4]
$a2[5]
$a2[6]
$a2[7]
}
I get 10 times the data:
id2
title2
Description2
Rew2
I'd like to get one for the first time:
id2
title2
Description2
Rew2
For the second time:
id3
title3
Description3
Rew3
Third time:
id4
title4
Description4
Rew4
Fourth time:
id5
title5
Description5
Rew5
Fifth time:
id6
title6
Description6
Rew6
Sixth time:
id7
title7
Description7
Rew7
The seventh time:
id8
title8
Description8
Rew8
Eighth time:
id9
title9
Description9
Rew9
Ninth time:
id10
title10
Description10
Rew10
Tenth time:
id11
title11
Description11
Rew11