mike1313 Posted December 1, 2007 Share Posted December 1, 2007 How can I add to a string let's use this as an example. $string = "hi there"; How can I make it so it will add Mike at the end of $string? Link to comment https://forums.phpfreaks.com/topic/79664-adding-to-a-string/ Share on other sites More sharing options...
Orio Posted December 1, 2007 Share Posted December 1, 2007 <?php $string = "hi there"; $string .= "Mike"; echo $sting; //Outputs- "hi thereMike" ?> Notice the ".=" operator, called concatenating assignment operator. You can always find out more in the manual: http://www.php.net/manual/en/language.operators.string.php Orio. Link to comment https://forums.phpfreaks.com/topic/79664-adding-to-a-string/#findComment-403475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.