Print and echo statements in PHP

Echo and print statements in PHP

In PHP there are two fundamental approaches to get yield: resound and print.

In this instructional exercise we utilize reverberate (and print) in every illustration. In this way, this section contains somewhat more data about those two yield articulations.

resound and print are pretty much the same. They are both used to yield information to the screen.

The distinctions are little: resound has no arrival quality while print has an arrival estimation of 1 so it can be utilized as a part of expressions. reverberation can take numerous parameters (albeit such use is uncommon) while print can take one contention. reverberation is barely quicker than print.

Echo statements in PHP:
                  Echo statements used with or without parentheses echo() or echo.

                  For example:
                               <?php
                                      echo 'This is my first PHP test code';
                                      echo ('This is my first PHP test code');
                               ?>


Print Statements in PHP :
                   Print statements used with or Without parentheses print or print().

                   For Example:

                              <?php
                                   print 'This is my first PHP code';
                                   print ('This is my first PHP code');
                              ?>

No comments:

Post a Comment