What is the difference between php echo and print

Discussion in 'PHP' started by Sangeetha.M, Jul 17, 2008.

  1. #1
    :rolleyes:Hi all,

    Could any one of you please come out with the solution for my question???please help me.....
     
    Sangeetha.M, Jul 17, 2008 IP
  2. kumbhdesign

    kumbhdesign Banned

    Messages:
    82
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can you provide some more detail...
     
    kumbhdesign, Jul 17, 2008 IP
  3. app789

    app789 Peon

    Messages:
    330
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I dont think print is a command in php to work like echo, may be i m worng.
     
    app789, Jul 20, 2008 IP
  4. billy786

    billy786 Peon

    Messages:
    323
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    echo and print are both constructs not functions in php, you can use them both display values to screen.

    echo allows you to display multiple values from a single echo.

    print returns a values.

    thats what i was taught in uni lol ;)

    If you need more help with php just pm me or something
     
    billy786, Jul 20, 2008 IP
  5. hydroflame7

    hydroflame7 Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hmmm.. this might be the in the wrong part of the forum and i always thought the difference was nothing too important so i always used php echo.
     
    hydroflame7, Jul 20, 2008 IP
  6. whitemind

    whitemind Active Member

    Messages:
    243
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #6
    You are right
     
    whitemind, Jul 21, 2008 IP