ThePimpedMistletoe said:What exactly do you mean, so it sais:
Hello World
My Name is Zero3X
<?PHP
$string = "My Name is Zero3X";
echo "Hello World<BR />$string";
?>
<?php
$string1 = "This is my first string.";
$string2 = "This is my second string.";
// OUTPUT: This is my first string.This is my second string
echo = $string1.$string2;
?>
<?php
$string = "This is string part one";
$string = $string ." and this is the second part";
// OUTPUT: This is string part one and this is the second part
echo $string;
?>
<?php
$string2 = "and the second;
// OUTPUT: This is the first part of the string - and the second
echo "This is the first part of the sting - ". $string2;
?>
JamesD31 said:Code:<?php $string = "This is string part one"; $string = $string ." and this is the second part"; // OUTPUT: This is string part one and this is the second part echo $string; ?>
<?php
$string = "This is string part one";
$string .= " and this is the second part";
// OUTPUT: This is string part one and this is the second part
echo $string;
?>
imkingdavid said:Just a comment about the following...
JamesD31 said:Code:<?php $string = "This is string part one"; $string = $string ." and this is the second part"; // OUTPUT: This is string part one and this is the second part echo $string; ?>
Can also be accomplished:
Not a big deal, but it's shorter to write. 😉Code:<?php $string = "This is string part one"; $string .= " and this is the second part"; // OUTPUT: This is string part one and this is the second part echo $string; ?>
Since 2007, Forum Promotion has specialized in providing advertising solutions to webmasters looking to promote their communities. We pride ourselves in being the bridge that connects forum administrators, bloggers, and more.
We use essential cookies to make this site work, and optional cookies to enhance your experience.