What is the function to start the session?
-
session_start()
-
session_init()
-
session_boot()
-
None of the Above
A
Correct answer
Explanation
session_start() is the correct PHP function to initialize a session - it must be called before any output is sent to the browser. The other options don't exist - session_init() and session_boot() are not valid PHP functions. Once started, session data becomes available through the $_SESSION superglobal.