Hi all,
I’ve seen several examples here and elsewhere, where you can create a variable from a variable via something like: ${$myvar}; but nothing using an expression.
From other examples I’ve seen on this forum, you can also use square brackets to build variables from variables.
Anyway, based on a loop, I want to create a series of variables as follows:
$MyTemplateShift1Start
$MyTemplateShift2Start
$MyTemplateShift3Start
$MyTemplateShift4Start
etc
Assuming I am looping where I increment $shiftnumcount by one with each loop, will the following work? Note, for my purposes, the looping number stored in $shiftnumcount MUST be set one higher that the loop for each variable – thus the need for an expression.
[CODE]while ($shiftnumcount >= $NumberSelectedByUser) {
$RosterTemplateShift[($shiftnumcount+1).’Start’];
}
Any help is much appreciated!
Cheers,
Chris