Learning PHP and MySQL
Example 03-18 Concatenating strings together
<?php
$my_string = "Hello Max. My name is: ";
$newline = "<br />";
echo $my_string . "Paula" . $newline;
echo "Hi, I'm Max. Who are you? " . $my_string . $newline;
echo "Hi, I'm Max. Who are you? " . $my_string . "Paula";
//The last line is the same as echo "Hi, I’m max. Who are you? $my_string Paula";
?>
Posted by on 07/19 at 03:55 PM
Next entry: Example 03-19 Combining a string and a number
Previous entry: Example 03-17 Using strcmp to compare two stings