Echo ""; Or Print"";

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Now I am using
    echo "hello";
    but think i will
    echo 'hello' ;
    because wml codes

    Comment


      #17
      Yes its smaller to use echo 'hi'; rather than echo "hi"; and you dont need to press the shift key to make the sign ""

      Comment


        #18
        i only use echo and if im working on someone script an i see print i replace it with echo and it dont get any error lol.......

        Comment


          #19
          print doesnt give error to me.

          Comment


            #20
            lol i learned with echo""; so i keep you using that..
            8th wonder of the world

            Comment


              #21
              echo ''; works really great.I will soon be replacing print with echo.

              Comment


                #22
                i love it echo "Lamar Rulez Ok";

                Comment


                  #23
                  echo &#39;<big>Me too.lol</big>
                  &#39;;

                  Comment


                    #24
                    There is a difference between the two, but speed-wise it should be
                    irrelevant which one you use. print() behaves like a function in that
                    you can do: $ret = print "Hello World";And $ret will be 1That means
                    that print can be used as part of a more complex expression where echo
                    cannot. print is also part of the precedence table which it needs to
                    be if it is to be used within a complex expression. It is just about at
                    the bottom of the precendence list though. Only "," AND, OR and XOR
                    are lower.echo is marginally faster since it doesn&#39;t set a return value
                    if you really want to get down to the nitty gritty.If the grammar is:
                    echo expression [, expression[, expression] ... ]Then echo (
                    expression, expression ) is not valid. ( expression ) reduces to just
                    an expression so this would be valid: echo ("howdy"),("partner");but
                    you would simply write this as: echo "howdy","partner"; if you wanted
                    to use two expression. Putting the brackets in there serves no purpose
                    since there is no operator precendence issue with a single expression
                    like that.

                    Comment


                      #25
                      from where did you get that text above?
                      8th wonder of the world

                      Comment


                        #26
                        from one my old book

                        Comment


                          #27

                          Comment


                            #28
                            yeah that one

                            Comment


                              #29
                              ya all are discussing about one simple command which are both used just for commenting and both works well and good whether on wap or web
                              Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                              <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                              Comment


                                #30
                                One difference is that echo() can take multiple expressions:
                                <?php
                                echo "The first", "the second";
                                ?>
                                Print cannot take multiple expressions.
                                Echo has the slight performance advantage because it doesn&#39;t have a return value.
                                True, echo is a little bit faster, but nothing you&#39;ll notice. I tried outputting around 10000 strings, there was a difference of around .02 seconds
                                http://ngeo.ro

                                Comment

                                Working...
                                X