jasonc Posted September 9, 2010 Share Posted September 9, 2010 I have seen somewhere that you can add to a string like so $var = "text"; or $string ="var"; &$var = "text"; it is the latter that I am wanting to know more about. Quote Link to comment Share on other sites More sharing options...
petroz Posted September 9, 2010 Share Posted September 9, 2010 Never done it that way... I've always done.. Interested in seeing the other one your talking about.. $var = '1'; $var .= '2'; echo $var; //echo's 12 Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted September 9, 2010 Share Posted September 9, 2010 What you have provided is still incorrect, but if you're wondering about the ampersand then it's used for references. $foo = 'foo bar'; $bar = &$foo; $bar = 'bar foo'; echo $foo; // will output bar foo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.