I have an counter, that gives me the number of times I found a phrase in a document. And Now I need to create a variable for each, example:
//Counter
$fstNameCtr = 0;
do {
$fstNameCtr = $fstNameCtr + 1;
} while ($firstNameRange->Execute($objFstName));
echo '$fstNameCtr';
The result came back with 2 instances of the phrase and I'm looking for, now I would like to create a variable for each dynamically based on the number in the counter as following like as:
$instance1
$instance2
or
$instanceOne
$instanceTwo
Any help would be appreciated, thank you.