I have a PHP for loop:
for ($counter=0,$counter<=67,$counter++){
echo $counter;
$check="some value";
}
what I am trying to acheive is use the for loop variable and append it to the name of another variable.
Bascially, I want the PHP output to be as follows for each row
1
$check1="some value"
2
$check2="some value"
3
$check3="some value"
4
$check4="some value"
etc etc
How can I acheive this? am I missing something obvious?
I have tried $check.$counter="some value"
but this fails.
any advice?
Thans as always,
array
be preferable to this method?$myVar = array(); for($i = 0; $i <= 67; $i++) { $myVar[] = "Some Value"; }
– Matt Jul 31 '12 at 12:40