• 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 2 out of 6 pages
Exam (elaborations)

Php Exam Questions And Answers

Document preview thumbnail
Preview 2 out of 6 pages

PHP EXAM QUESTIONS AND ANSWERS

Content preview

PHP EXAM QUESTIONS AND ANSWERS

How many of the following statements are true for PHP operators? x+=y is the same as
x=x+y x=-y is the same as x=x-y x.=y is the same as x=x.y

1 2 or 3 - Answers -3

In PHP, a constant is set by the - Answers -define()function

t or f

In MySQL, the AND operator displays a record if ALL conditions listed are true. -
Answers -true

In PHP, ID keys in arrays are always assigned automatically. - Answers -true

How many of the following statements are true for PHP? PHP can only run on a Apache
server. PHP is a W3C standard. A PHP file has the file extension ".php". PHP scripts
are executed on the server.

1
2
3
4 - Answers -3

In MySQL, how to return all the records from a table named "Customers" sorted
REVERSE alphabetically by "FirstName"? - Answers -

t or f

In PHP, the setcookie() function must appear BEFORE the <html> tag. - Answers -

Which of the following is true for PHP variables?

Unless a data type is declared, it will be set to String as default
The data type is declared automatically when you use the variable
A variable must always be declared before being used - Answers -

What PHP function fetches a result row (from a MySQL connection) as an associative
array, a numeric array, or both? - Answers -

What PHP function is used to open a new connection to the MySQL server? - Answers
-

In MySQL, how to select all columns from a table named "Customers"?

, Group of answer choicesSELECT * CustomersSELECT * FROM CustomersSELECT
[all] FROM Customers - Answers -

In PHP, large comment blocks are defined by:
Group of answer choices<comment> and </comment>// and \\/* and */<!-- and --> -
Answers -

In PHP, a timestamp can be made with the
Group of answer choicessetdate() functionmktime() functiontimestamp() function -
Answers -

A MySQL connection in PHP will automatically close when the script ends.
Group of answer choicesTrueFalse - Answers -

Which of the following is NOT a valid variable name in PHP?
Group of answer choices$salesPerWeek$sales_per_week$sales-per-week - Answers -

All variables in PHP start with which symbol?
Group of answer choices&#$! - Answers -

In MySQL, how to select all the records from a table named "Customers" where
"FirstName" starts with an "a"?
Group of answer choicesSELECT * FROM Customers WHERE
FirstName=''a%''SELECT * FROM Customers WHERE FirstName LIKE ''a%''SELECT *
FROM Customers WHERE FirstName LIKE ''a'' - Answers -

What is the correct way to create a function in PHP?
Group of answer choicescreate myFunction()new_function myFunction()function
myFunction() - Answers -

What does PHP stand for? - Answers -PHP: Hypertext Preprocessor

In PHP, you can get the value of a constant with the
Group of answer choicesconstant() functionconstant_value() functionget_constant()
function - Answers -

In PHP, you can get the value of a constant with the - Answers -Constant () function

In MySQL, which keyword is used to sort the result?
Group of answer choicesSORT BYORDERORDER BYSORT - Answers -

How do you write "Hello World" in PHP?
Group of answer choicesResponse.Write("Hello World");output "Hello World";echo
"Hello World"; - Answers -

In MySQL, what is the proper syntax for inserting new data in a database?

Document information

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

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
2223
Followers
1450
Items
62835
Last sold
1 day 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