note 38422 deleted from function.print by nlopess

From: Date: Sat, 20 Dec 2003 09:11:09 +0000
Subject: note 38422 deleted from function.print by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62266@lists.php.net to get a copy of this message
Note Submitter: PHP Helper ---- The simplest way to do a print statement is as follows: <?php print "hello"; ?> Which prints out the following: hello Just put whatever you want to print in parentheses after the word "print", and follow it up with a semi-colon. Next, if you are printing multiple lines, be sure to use <br> at the end of your print statement, inside the parentheses, like this: <?php print "hello<br>"; print "how are you?<br>"; ?> Which will print: hello how are you? Without <br> in your print statemnt, the two lines would have been combined like the following: hellohow are you? And, we wouldn't want that. Next, if you want to print a blank line between the two lines, insert the following code between the two lines: print " <br>"; So that you're code will look like the following: <?php print "hello<br>"; print " <br>"; print "how are you?<br>"; ?> This will print the following: hello how are you?

« previous php.notes (#62266) next »