PHP: Using the string concatenation
Posted on September 6, 2008, Filled under PHP,
Bookmark it
Here are some simple examples of string concatenation:
<?php $first_name = 'John'; $last_name = 'Jones'; $work_area = 'IT Industry'; $text = 'His name is '.$first_name.' '.$last_name.' and he is working in the '.$work_area; // Output: His name is John Jones and he is working in the IT Industry echo $text; ?>
Do you wish to receive the latest updates as soon as they are posted? Get our RSS Feed or Subscribe to the Newsletter!
- September 6, 2008
- article by Gabriel C.
- 2 comments
Related Posts
Format text into a SEO Friendly Stringat August 28, 2008 with 1 comment
Create, Customize and Send Newsletters: MeeNewsat August 3, 2009 with 1 comment
How to replace multiple spaces from a string in PHPat August 29, 2008 with 1 comment

2 Replies to "PHP: Using the string concatenation"
June 6, 2009 at 10:33 PM
Im guessing you meant: and he is working in the ‘.$work_in instead of $work_area;
June 6, 2009 at 10:42 PM
Sure, thanks for noticing