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

[eluser]Craig A Rodway[/eluser]
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}!";


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



Theme © iAndrew 2016 - Forum software by © MyBB