I have the following problem:
I have some variables in my script. Now I want to process them in a for loop, but don't know how I have to solve my little problem.
My idea was to change the number (in the name) of my variable each time.
This is my script
<?php
$tropfenzahl = 2;
$v1_d1 = 10;
$v1_w2 = 20;
$v1_d2 = 30;
$v1_w3 = 40;
for($i = 1; $i <= $tropfenzahl; $i++) {
echo $v1_d1;
echo $v1_w2;
}
?>
The next time I want to echo $v1_d2 and $v1_w3 (up one number).
I think that the solution is very easy, but I don't get it right now =/
Have a nice one!