ev5unleash Posted November 14, 2010 Share Posted November 14, 2010 Hey guys, I'm new to PHP and I'm currently teaching myself. I'm looking over some code and I'm confused when to use "." inside of code. Can someone please explain to me? Here's some example code I read from a book: <?php $counter = 1; while ($counter <= 12) { echo $counter." times 2 is ".($counter * 2). "<br />" $counter++; } ?> Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/218676-noob-question-when-to-use-and/ Share on other sites More sharing options...
trq Posted November 14, 2010 Share Posted November 14, 2010 . is used to join two variables together. I'm not sure it can be explained much simpler. Quote Link to comment https://forums.phpfreaks.com/topic/218676-noob-question-when-to-use-and/#findComment-1134202 Share on other sites More sharing options...
ev5unleash Posted November 14, 2010 Author Share Posted November 14, 2010 Alright thanks, I guess that'll help a little. I will probably understand it more when I start coding? Quote Link to comment https://forums.phpfreaks.com/topic/218676-noob-question-when-to-use-and/#findComment-1134204 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.