Welcome Guest, Not a member yet? Register   Sign In
When it comes to echoing or setting do you prefer ' or "
#7

[eluser]Sarre[/eluser]
[quote author="Craig Rodway" date="1201107424"]Single quotes for strings where I don't need variable access, and double-quoted for strings where I need to access variables (but only with curly braces - this is quicker than just placing variable references in strings).

Code:
$name = 'Craig';
echo "Hello world, my name is {$name}!";
[/quote]
Erm? Why exactly with curly braces? I never use those...
Is there a big speed difference?


Messages In This Thread
When it comes to echoing or setting do you prefer ' or " - by El Forum - 01-23-2008, 06:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB