Use variable in $data
Posted: 2020-07-16 09:33
Hi,
Is it possible to "index into" the $data['fieldname'] array? I have tried: $data['fieldname[X]'] but it didn't work..
a little example of what I want:
fieldnames = array("fieldname1","fieldname2","fieldname3");
for ($x = 0; $x <= 10; $x++) {
$data( [fieldname[x] ) = something;
}
I have fields both before and after the fields I want to alter, so I would preffer not to loop through all the fields in the table...
I hope you understand my explanation, any help is appriciated, thank you
Kind regards
Peter
Is it possible to "index into" the $data['fieldname'] array? I have tried: $data['fieldname[X]'] but it didn't work..
a little example of what I want:
fieldnames = array("fieldname1","fieldname2","fieldname3");
for ($x = 0; $x <= 10; $x++) {
$data( [fieldname[x] ) = something;
}
I have fields both before and after the fields I want to alter, so I would preffer not to loop through all the fields in the table...
I hope you understand my explanation, any help is appriciated, thank you

Kind regards
Peter