SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: PHP

  1. #1
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP

    What is the diffrence between the echo and printf?

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Location
    United Kingdom
    Posts
    77
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    echo is a language construct (optional use of parenthesis).
    printf is a function.
    echo is slight faster and the variables have to be embedded in the string upon output.
    printf produces a formatted string that takes multiple arguments.

    See the php.net manual for more information on the two:
    printf
    echo


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •