PHP Interview Question and Answers3 by AnjaliDeene


									                         PHP Interview Question and Answers

6.   What Is a Session?
     A session is a logical object created by the PHP engine to allow
     you to preserve data across subsequent HTTP requests.
     Sessions are commonly used to store temporary data to allow
     multiple PHP pages to offer a complete functional transaction
     for the same visitor.
7.   How can we register the variables into a session?
8.   How do you destroy a particular or all Sessions?
     // store session data
     unset($_SESSION['views']); // If you wish to delete some
     session data, you can use the unset()
     session_destroy(); // You can also completely destroy the
     session by calling the session_destroy() function.
     session_destroy() will reset your session and you will lose all
     your stored session data.
9.   How many ways we can pass the variable through the
     navigation between the pages?
    Register the variable into the session
    Pass the variable as a cookie
    Pass the variable as part of the URL

10. What are the different functions in sorting an array?
    asort()
    arsort()
    ksort()
    krsort()
    uksort()
    sort()
    natsort(),rsort()

To top