I want to add these so they print "group1"
$i = 1; $test = 'group'; $groupnew = "$test" + $c; echo $groupnew;
What is wrong with this code?
$groupnew = $test . $i
Your using an Arithmetic operator "+" to try and concatenate a string.
To do this use the .
$i = 1; $test = 'group'; $groupnew = "$test" . $c; echo $groupnew;
String Operators has a little more on how it works.