echo vs print

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Smith

    echo vs print

    What's the difference between Echo and Print?

    J.
  • Herbie Cumberland

    #2
    Re: echo vs print

    In message-id <40d39a93$0$161 04$afc38c87@new s.optusnet.com. au>,
    James Smith wrote:
    [color=blue]
    >What's the difference between Echo and Print?[/color]




    Comment

    • Chung Leong

      #3
      Re: echo vs print


      "James Smith" <smitro@myrealb ox.com> wrote in message
      news:40d39a93$0 $16104$afc38c87 @news.optusnet. com.au...[color=blue]
      > What's the difference between Echo and Print?
      >
      > J.[/color]

      Print is possible only when there's freedom of the press. Otherwise all you
      can do is echo.


      Comment

      • CJ Llewellyn

        #4
        Re: echo vs print

        "James Smith" <smitro@myrealb ox.com> wrote in message
        news:40d39a93$0 $16104$afc38c87 @news.optusnet. com.au...[color=blue]
        > What's the difference between Echo and Print?[/color]

        One is spelt echo and the other is spelt print otherwise they are pretty
        much the same, and your choice will depend on what programming languages you
        used prior to php or what source you learnt php from.


        Comment

        • Pedro Graca

          #5
          Re: echo vs print

          James Smith wrote:[color=blue]
          > What's the difference between Echo and Print?[/color]

          Although both are language constructs, print() can be used as a
          function.


          1 <?php
          2
          3 $x = 'hello world';
          4
          5 if (print($x)) echo 'if (print()) worked';
          6 echo "\n";
          7 if (echo ($x)) echo 'if (echo()) worked';
          8 echo "\n";
          9
          10 ?>


          Here, line 7 gives a parse error.

          --
          USENET would be a better place if everybody read: | to email me: use |
          http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
          http://www.netmeister.org/news/learn2quote2.html | header, textonly |
          http://www.expita.com/nomime.html | no attachments. |

          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: echo vs print

            James Smith <smitro@myrealb ox.com> wrote in message news:<40d39a93$ 0$16104$afc38c8 7@news.optusnet .com.au>...[color=blue]
            > What's the difference between Echo and Print?[/color]

            Manual is your friend. www.php.net/<keyword>
            ==> http://www.php.net/echo

            --
            | Just another PHP saint |
            Email: rrjanbiah-at-Y!com

            Comment

            • Justin Koivisto

              #7
              Re: echo vs print

              James Smith wrote:
              [color=blue]
              > What's the difference between Echo and Print?[/color]

              echo is faster and less to type. ;)

              --
              Justin Koivisto - spam@koivi.com
              PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.

              Comment

              Working...