Uhmm well, you don't have to use print to display HTML. If you did there
would be no reason for the ? ? tags. ? ? switches between HTML (which is
not parsed by the interpreter and PHP code (which is interpreted).
Basically, print is used when you have to print a variable.
For instance
Here are a few examples of what you _can_ do :
?php
$color = 'blue';
$width = 300;
print 'table width="300" bgcolor="blue"';
print "table width='300' bgcolor='blue'";
print 'table width='.$width.'" bgcolor="'.$color.'"';
print "table width='$width' bgcolor='$color'";
On that subject what's the difference between echo
and print?
Jeff Oien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
See this :
What is the difference between echo and print ?
---
http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/41
It should help!
Regards,
Philip
On Wed, 7 Feb 2001, Jeff Oien wrote:
On that subject
Oien [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, February 07, 2001 10:48 AM
Subject: RE: [PHP] html -echo-print
On that subject what's the difference between echo
and print?
Jeff Oien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
JB,
yes I do know that, but thanks :)
I was looking for:
pre
print EOF
EOF;
/pre
of course it was on : http://www.php.net/manual/en/function.print.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
6 matches
Mail list logo