aximbigfan Posted February 19, 2008 Share Posted February 19, 2008 I have seen this a few times. What exactly does it do? Example: $variable .= (something) Thanks, Chris Link to comment https://forums.phpfreaks.com/topic/91798-dot-before-in-variable/ Share on other sites More sharing options...
kenrbnsn Posted February 19, 2008 Share Posted February 19, 2008 It's a shorthand for <?php $variable = $variable . 'something'; ?> Just like "+=", "-=", etc. Ken Link to comment https://forums.phpfreaks.com/topic/91798-dot-before-in-variable/#findComment-470123 Share on other sites More sharing options...
phpSensei Posted February 19, 2008 Share Posted February 19, 2008 if you have a string like $var = "My Dog Is:"; And you want to add a next word to that, its the same as $var = "My Dog Is:" . " Happy"; but instead $var = "My Dog Is:"; $var .= " Happy"; or $var = "My Dog Is:"; $mood = " happy"; $var .= $mood; Link to comment https://forums.phpfreaks.com/topic/91798-dot-before-in-variable/#findComment-470128 Share on other sites More sharing options...
aximbigfan Posted February 19, 2008 Author Share Posted February 19, 2008 Oh, ok. Thanks! Chris Link to comment https://forums.phpfreaks.com/topic/91798-dot-before-in-variable/#findComment-470129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.