ayo Posted January 30, 2006 Share Posted January 30, 2006 I am totally new to php. can someone please tell me what is the function for adding strings (concatenation in basic). thanksayo Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 30, 2006 Share Posted January 30, 2006 I'm not quite sure what you mean, but this may be it: $string1 = "Hello ";$string2 = "World!";$string1 .= $string2;echo $string1; This will make $string1 = "Hello World!" and output it. $string1 = "Hello ";$string2 = "World!";$string3 = $string1 . $string2;echo $string3; This will make a $string3 = "Hello World!" and output it. Only do it this way if you want to keep the parts of the string seperate. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now