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! 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. 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? 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
Archived
This topic is now archived and is closed to further replies.