Hi everyone,
I made a chunk of code where I wanted to perform a "for" loop within a concatenated string.
This is what I came up with:
$message = "The Top 5 Employees of the month are:" .
for ($ctr = 0; $ctr < 5; $ctr++)
{
$num = $ctr + 1;
$num . ". " . $helperNameArray[$ctr] . " helped " .
$helperCountArray[$ctr] . " customers." .
}
" ";
I haven't tested it yet and just wanted to confirm before testing if this is possible and if my code needs to be modified in any way.
Thanks.