Category: Interview Questions

  • echo and print in PHP?

    • echo can output multiple strings, and is slightly faster.
    • print can only output one string, and always returns 1.
    echo "Hello ", "World";   // works
    print "Hello World";      // works
    
  • What is PHP and why is it used?

    • PHP stands for Hypertext Preprocessor.
    • It is a server-side scripting language used to create dynamic web applications.
    • It can connect with databases, handle forms, manage sessions/cookies, etc.