PHP New Line Help
Posted
by Jeremy Person
on Stack Overflow
See other posts from Stack Overflow
or by Jeremy Person
Published on 2010-03-21T17:45:50Z
Indexed on
2010/03/21
17:51 UTC
Read the original article
Hit count: 407
php5
I'm just starting PHP programming as you can tell. I want the results of each statement to be on their own line but can't get it to work yet. I tried referring to the code on this page and am obvsiously doing something wrong. Thank you very much.
<?
$mySentence="This is a sentence 123456789.";
$myNumber1 = 9.5;
$myNumber2 = .5;
$sum = $myNumber1 + $myNumber2;
echo "Hello, lets display our PHP variables: \r";
echo $mySentence;
echo "The sum of $myNumber 1 and $myNumber2 = $sum ";
echo "\"This text has double quotes\"";
?>
© Stack Overflow or respective owner