Below is the text of the page https://www.php.net/echo stored 2015-12-09 by archive.org.ua. The original page over time could change. View as original html

PHP: echo - Manual

[/] Downloads Documentation Get Involved Help PHP 7.0.0 Released Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Errors Exceptions Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Filesystem Security Database Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts ? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search (current page) / Focus search box explode » « crypt PHP Manual Function Reference Text Processing Strings String Functions Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug echo (PHP 4, PHP 5) echo — Output one or more strings Description void echo ( string $arg1 [, string $... ] ) Outputs all parameters. echo is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo , the parameters must not be enclosed within parentheses. echo also has a shortcut syntax, where you can immediately follow the opening tag with an equals sign. Prior to PHP 5.4.0, this short syntax only works with the short_open_tag configuration setting enabled. I have foo. Parameters arg1 The parameter to output. ... Return Values No value is returned. Examples Example #1 echo examples "foo" ); echo "this is { $baz [ 'value' ]} !" ; // this is foo ! // Using single quotes will print the variable name, not the value echo 'foo is $foo' ; // foo is $foo // If you are not using any other characters, you can just echo variables echo $foo ; // foobar echo $foo , $bar ; // foobarbarbaz // Some people prefer passing multiple parameters to echo over concatenation. echo 'This ' , 'string ' , 'was ' , 'made ' , 'with multiple parameters.' , chr ( 10 ); echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . "\n" ; echo << Notes Note : Because this is a language construct and not a function, it cannot be called using variable functions . See Also print - Output a string printf() - Output a formatted string flush() - Flush system output buffer Heredoc syntax add a note User Contributed Notes There are no user contributed notes for this page. String Functions addcslashes addslashes bin2hex chop chr chunk_​split convert_​cyr_​string convert_​uudecode convert_​uuencode count_​chars crc32 crypt echo explode fprintf get_​html_​translation_​table hebrev hebrevc hex2bin html_​entity_​decode htmlentities htmlspecialchars_​decode htmlspecialchars implode join lcfirst levenshtein localeconv ltrim md5_​file md5 metaphone money_​format nl_​langinfo nl2br number_​format ord parse_​str print printf quoted_​printable_​decode quoted_​printable_​encode quotemeta rtrim setlocale sha1_​file sha1 similar_​text soundex sprintf sscanf str_​getcsv str_​ireplace str_​pad str_​repeat str_​replace str_​rot13 str_​shuffle str_​split str_​word_​count strcasecmp strchr strcmp strcoll strcspn strip_​tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_​compare substr_​count substr_​replace substr trim ucfirst ucwords vfprintf vprintf vsprintf wordwrap Copyright © 2001-2015 The PHP Group My PHP.net Contact Other PHP.net sites Mirror sites Privacy policy