1. Home
  2. Computer Science MCQs
  3. PHP
  4. How do you start a session in PHP?

Added 20 Jan 2024

How do you start a session in PHP?

  1. session_begin()
  2. session_start() Correct answer
  3. start_session()
  4. begin_session()

Correct answer

B. session_start()

15 views

MCQSEXAM

Explanation

The session_start() function must be called before any output is sent to the browser.

Reference

Asked in: PHP Certification

https://www.php.net/manual/en/function.session-start.php

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs