• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 2 pages
Exam (elaborations)

Php Interview Questions & Answers

Document preview thumbnail
Preview 1 out of 2 pages

PHP INTERVIEW QUESTIONS & ANSWERS

Content preview

PHP INTERVIEW QUESTIONS & ANSWERS


What is the use of "echo" in php? - Answers -It is used to print a data in the webpage

How to include a file to a php page? - Answers -include a file using "include() " or
"require()" function with file path as its parameter.

What's the difference between include and require? - Answers -If the file is not found by
require(), it will cause a fatal error and halt the execution of the script. If the file is not
found by include(), a warning will be issued, but execution will continue.

Differences between GET and POST methods ? - Answers -We can send 1024 bytes
using GET method but POST method can transfer large amount of data and POST is
the secure method than GET method

How to declare an array in php? - Answers -$arr = array('apple', 'grape', 'lemon');

What is use of in_array() function in php ? - Answers -in_array used to checks if a value
exists in an array

What is use of count() function in php ? - Answers -count() is used to count all elements
in an array, or something in an object

What is the difference between Session and Cookie? - Answers -The main difference
between sessions and cookies is that sessions are stored on the server, and cookies
are stored on the user's computers in the text file format.

How to set cookies in PHP? - Answers -Setcookie("sample", "ram", time()+3600);

what types of loops exist in php? - Answers -for,while,do while and foreach

How we can retrieve the data in the result set of MySQL using PHP? - Answers -1.
mysql_fetch_row
2. mysql_fetch_array
3. mysql_fetch_object
4. mysql_fetch_assoc

What is the difference between explode() and split() functions? - Answers -Split
function splits string into array by regular expression. Explode splits a string into array
by string.

How stop the execution of a php scrip ? - Answers -exit() function is used to stop the
execution of a page

Document information

Uploaded on
January 23, 2026
Number of pages
2
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$9.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA
3.8
(376)
Sold
2225
Followers
1451
Items
62880
Last sold
9 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions