Home › Forums › Back End › FOR loop with counter in variables › Re: FOR loop with counter in variables
May 20, 2013 at 6:48 pm
#135778
__
Participant
> I think the whole confusion is rooted in the way quotes have to be used. It sure confused me
Remember, single-quotes ( `’` ) make literal strings – every character you type ( except “, but let’s not get into that right now) will be exactly as you see it.
With double-quotes ( `”` ) , PHP will interpret variables and escape characters in the string. So,
$var = ‘world’;
echo ‘Hello, $var’; # prints “Hello, $var”
echo “Hello, $var”; #prints “Hello, world”