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? Quote Link to comment 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. 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.