September 2001
Intermediate to advanced
768 pages
32h 45m
English
int print(mixed value) Sends a value to stdout.
Returns:
1 on success; nothing on failure
Description:
print is a language construct that converts a value to a string and sends it to standard output. Standard output is usually a browser or command interpreter (a.k.a. shell/DOS window).
Placing parentheses () around the argument to print is optional; for example, print "Hi!"; works quite nicely without parentheses.
Version:
PHP 3+, PHP 4+
See also:
To send a string to stdout:
echo() printf()
Example:
<?php
print "Hello Joe!\n";
print ("What is your favorite color?'."\n";
print 200;
print ("\n" . sqrt (100));
?>
Output:
Hello Joe!
What is your favorite color?
200
10
|
Read now
Unlock full access