I have 10 variables: $c1=a; through $c10=j;
I also have a variable $i=1;
I’m now wondering if there is any way possible that I can write abcdefghij on the page without having to write echo $c1.$c2.$c3.$c4.$c5.$c6.$c7.$c8.$c9.$c10;
I’ve been trying:
if ($i<11){
echo "$c$i";
$i++;
}
But of course, that does not work, and almost every other combination I try just outputs plain text onto the screen. Is this possible?
Use this:
But as stated in the comments you should stick to arrays!